diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2014-04-04 21:44:18 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2014-04-04 21:44:18 +0400 |
commit | 052bed30a3d83aa8fb7b8b42509ad96f573439af (patch) | |
tree | 106b44c06226595870c3bf54f890824eec2b7f0e /tests | |
parent | 88ef120511caae5ed74a48a87617b43aec4b7f76 (diff) |
Move HashList to Torrent module
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Data/Torrent/MetainfoSpec.hs | 1 | ||||
-rw-r--r-- | tests/Data/Torrent/PieceSpec.hs | 2 | ||||
-rw-r--r-- | tests/Network/BitTorrent/Exchange/Session/MetadataSpec.hs | 5 | ||||
-rw-r--r-- | tests/System/Torrent/StorageSpec.hs | 3 |
4 files changed, 4 insertions, 7 deletions
diff --git a/tests/Data/Torrent/MetainfoSpec.hs b/tests/Data/Torrent/MetainfoSpec.hs index 537b3f99..1a8f97c7 100644 --- a/tests/Data/Torrent/MetainfoSpec.hs +++ b/tests/Data/Torrent/MetainfoSpec.hs | |||
@@ -14,7 +14,6 @@ import Test.QuickCheck | |||
14 | import Test.QuickCheck.Instances () | 14 | import Test.QuickCheck.Instances () |
15 | 15 | ||
16 | import Data.Torrent | 16 | import Data.Torrent |
17 | import Data.Torrent.Piece | ||
18 | import Data.Torrent.LayoutSpec () | 17 | import Data.Torrent.LayoutSpec () |
19 | import Network.BitTorrent.Core.NodeInfoSpec () | 18 | import Network.BitTorrent.Core.NodeInfoSpec () |
20 | 19 | ||
diff --git a/tests/Data/Torrent/PieceSpec.hs b/tests/Data/Torrent/PieceSpec.hs index ef1f2938..d3933396 100644 --- a/tests/Data/Torrent/PieceSpec.hs +++ b/tests/Data/Torrent/PieceSpec.hs | |||
@@ -3,7 +3,7 @@ module Data.Torrent.PieceSpec (spec) where | |||
3 | import Control.Applicative | 3 | import Control.Applicative |
4 | import Test.Hspec | 4 | import Test.Hspec |
5 | import Test.QuickCheck | 5 | import Test.QuickCheck |
6 | import Data.Torrent.Piece | 6 | import Data.Torrent |
7 | 7 | ||
8 | 8 | ||
9 | instance Arbitrary a => Arbitrary (Piece a) where | 9 | instance Arbitrary a => Arbitrary (Piece a) where |
diff --git a/tests/Network/BitTorrent/Exchange/Session/MetadataSpec.hs b/tests/Network/BitTorrent/Exchange/Session/MetadataSpec.hs index 975ceb5b..5392d74b 100644 --- a/tests/Network/BitTorrent/Exchange/Session/MetadataSpec.hs +++ b/tests/Network/BitTorrent/Exchange/Session/MetadataSpec.hs | |||
@@ -7,8 +7,7 @@ import Test.Hspec | |||
7 | import Test.QuickCheck | 7 | import Test.QuickCheck |
8 | 8 | ||
9 | import Data.BEncode as BE | 9 | import Data.BEncode as BE |
10 | import Data.Torrent | 10 | import Data.Torrent as Torrent |
11 | import Data.Torrent.Piece as P | ||
12 | import Network.BitTorrent.Core | 11 | import Network.BitTorrent.Core |
13 | import Network.BitTorrent.Exchange.Message | 12 | import Network.BitTorrent.Exchange.Message |
14 | import Network.BitTorrent.Exchange.Session.Metadata | 13 | import Network.BitTorrent.Exchange.Session.Metadata |
@@ -36,7 +35,7 @@ simulateFetch :: InfoDict -> Updates (Maybe InfoDict) | |||
36 | simulateFetch dict = go | 35 | simulateFetch dict = go |
37 | where | 36 | where |
38 | blocks = chunkBy metadataPieceSize (BL.toStrict (BE.encode dict)) | 37 | blocks = chunkBy metadataPieceSize (BL.toStrict (BE.encode dict)) |
39 | packPiece ix = P.Piece ix (blocks !! ix) | 38 | packPiece ix = Torrent.Piece ix (blocks !! ix) |
40 | ih = idInfoHash dict | 39 | ih = idInfoHash dict |
41 | 40 | ||
42 | go = do | 41 | go = do |
diff --git a/tests/System/Torrent/StorageSpec.hs b/tests/System/Torrent/StorageSpec.hs index ebf4fe3e..96f1b036 100644 --- a/tests/System/Torrent/StorageSpec.hs +++ b/tests/System/Torrent/StorageSpec.hs | |||
@@ -7,9 +7,8 @@ import System.Directory | |||
7 | import System.IO.Unsafe | 7 | import System.IO.Unsafe |
8 | import Test.Hspec | 8 | import Test.Hspec |
9 | 9 | ||
10 | import Data.Torrent.Bitfield as BF | ||
11 | import Data.Torrent | 10 | import Data.Torrent |
12 | import Data.Torrent.Piece | 11 | import Data.Torrent.Bitfield as BF |
13 | import System.Torrent.Storage | 12 | import System.Torrent.Storage |
14 | 13 | ||
15 | 14 | ||