From 7e597cd924d2149b10f900c7dc14ce6e1e321cb5 Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Fri, 4 Apr 2014 23:06:41 +0400 Subject: [Spec] Follow module layout changes in Torrent --- tests/Data/Torrent/LayoutSpec.hs | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 tests/Data/Torrent/LayoutSpec.hs (limited to 'tests/Data/Torrent/LayoutSpec.hs') diff --git a/tests/Data/Torrent/LayoutSpec.hs b/tests/Data/Torrent/LayoutSpec.hs deleted file mode 100644 index a3fe7c02..00000000 --- a/tests/Data/Torrent/LayoutSpec.hs +++ /dev/null @@ -1,30 +0,0 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} -{-# LANGUAGE StandaloneDeriving #-} -module Data.Torrent.LayoutSpec (spec) where - -import Control.Applicative -import Test.Hspec -import Test.QuickCheck -import System.Posix.Types - -import Data.Torrent - - -instance Arbitrary COff where - arbitrary = fromIntegral <$> (arbitrary :: Gen Int) - -instance Arbitrary a => Arbitrary (FileInfo a) where - arbitrary = FileInfo <$> arbitrary <*> arbitrary <*> arbitrary - -instance Arbitrary LayoutInfo where - arbitrary = oneof - [ SingleFile <$> arbitrary - , MultiFile <$> arbitrary <*> arbitrary - ] - -spec :: Spec -spec = do - describe "accumPosition" $ do - it "" $ property $ \ p1 p2 p3 s1 s2 s3 -> - accumPositions [(p1, s1), (p2, s2), (p3, s3)] - `shouldBe` [(p1, (0, s1)), (p2, (s1, s2)), (p3, (s1 + s2, s3))] \ No newline at end of file -- cgit v1.2.3