diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/System/Torrent/StorageSpec.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/System/Torrent/StorageSpec.hs b/tests/System/Torrent/StorageSpec.hs index 2e94ccf1..40eaa9c7 100644 --- a/tests/System/Torrent/StorageSpec.hs +++ b/tests/System/Torrent/StorageSpec.hs | |||
@@ -8,6 +8,7 @@ import System.Directory | |||
8 | import System.IO.Unsafe | 8 | import System.IO.Unsafe |
9 | import Test.Hspec | 9 | import Test.Hspec |
10 | 10 | ||
11 | import Data.Torrent.Bitfield as BF | ||
11 | import Data.Torrent.Layout | 12 | import Data.Torrent.Layout |
12 | import Data.Torrent.Piece | 13 | import Data.Torrent.Piece |
13 | import System.Torrent.Storage | 14 | import System.Torrent.Storage |
@@ -86,3 +87,9 @@ spec = before createLayout $ do | |||
86 | sourceStorage s $= C.map bzeroPiece $$ sinkStorage s | 87 | sourceStorage s $= C.map bzeroPiece $$ sinkStorage s |
87 | b <- sourceStorage s $$ C.fold (\ b p -> b && isZeroPiece p) True | 88 | b <- sourceStorage s $$ C.fold (\ b p -> b && isZeroPiece p) True |
88 | b `shouldBe` True | 89 | b `shouldBe` True |
90 | |||
91 | describe "genPieceInfo" $ do | ||
92 | it "" $ do | ||
93 | withStorage ReadWrite psize layout $ \ s -> do | ||
94 | bf <- genPieceInfo s >>= getBitfield s | ||
95 | bf `shouldSatisfy` BF.full \ No newline at end of file | ||