diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2014-04-26 07:26:36 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2014-04-26 07:26:36 +0400 |
commit | 55d59c4857dee7e2ab091405e79854c944c7e7e3 (patch) | |
tree | 92ddc89ea3d2d139cab901be232caa5436c0ae42 /tests | |
parent | dab822160dbd0b9d4581c13d19f0efb9addc2db6 (diff) |
Bump conduit dependency
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Network/BitTorrent/DHT/SessionSpec.hs | 1 | ||||
-rw-r--r-- | tests/Network/BitTorrent/Exchange/DownloadSpec.hs | 14 |
2 files changed, 2 insertions, 13 deletions
diff --git a/tests/Network/BitTorrent/DHT/SessionSpec.hs b/tests/Network/BitTorrent/DHT/SessionSpec.hs index 522bd8df..a5376c32 100644 --- a/tests/Network/BitTorrent/DHT/SessionSpec.hs +++ b/tests/Network/BitTorrent/DHT/SessionSpec.hs | |||
@@ -5,6 +5,7 @@ import Control.Concurrent | |||
5 | import Control.Exception | 5 | import Control.Exception |
6 | import Control.Monad.Reader | 6 | import Control.Monad.Reader |
7 | import Control.Monad.Trans.Resource | 7 | import Control.Monad.Trans.Resource |
8 | import Data.Conduit.Lazy | ||
8 | import Data.Default | 9 | import Data.Default |
9 | import Data.List as L | 10 | import Data.List as L |
10 | import Test.Hspec | 11 | import Test.Hspec |
diff --git a/tests/Network/BitTorrent/Exchange/DownloadSpec.hs b/tests/Network/BitTorrent/Exchange/DownloadSpec.hs index a0d40af3..d46f2034 100644 --- a/tests/Network/BitTorrent/Exchange/DownloadSpec.hs +++ b/tests/Network/BitTorrent/Exchange/DownloadSpec.hs | |||
@@ -33,19 +33,7 @@ withUpdates m = do | |||
33 | undefined | 33 | undefined |
34 | 34 | ||
35 | simulateFetch :: InfoDict -> Updates s (Maybe InfoDict) | 35 | simulateFetch :: InfoDict -> Updates s (Maybe InfoDict) |
36 | simulateFetch dict = go | 36 | simulateFetch dict = undefined |
37 | where | ||
38 | blocks = chunkBy metadataPieceSize (BL.toStrict (BE.encode dict)) | ||
39 | packPiece ix = Torrent.Piece ix (blocks !! ix) | ||
40 | ih = idInfoHash dict | ||
41 | |||
42 | go = do | ||
43 | mix <- scheduleBlock undefined undefined | ||
44 | case mix of | ||
45 | Nothing -> return Nothing | ||
46 | Just ix -> do | ||
47 | mdict <- pushBlock undefined (packPiece ix) | ||
48 | maybe go (return . Just) mdict | ||
49 | 37 | ||
50 | spec :: Spec | 38 | spec :: Spec |
51 | spec = do | 39 | spec = do |