diff options
author | joe <joe@jerkface.net> | 2017-01-01 01:10:44 -0500 |
---|---|---|
committer | joe <joe@jerkface.net> | 2017-01-01 01:10:44 -0500 |
commit | 80c860df8c29f99e0a82b454c1c0f0c6902764ef (patch) | |
tree | afb7a07440b308179252f7e5a79cc85870705358 /tests/Network | |
parent | b0cb559c503e791c2a2297a6316d59dab6c49202 (diff) |
Fixed build of testsuite.
Diffstat (limited to 'tests/Network')
-rw-r--r-- | tests/Network/BitTorrent/DHT/RoutingSpec.hs | 3 | ||||
-rw-r--r-- | tests/Network/BitTorrent/Exchange/BitfieldSpec.hs | 5 | ||||
-rw-r--r-- | tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/tests/Network/BitTorrent/DHT/RoutingSpec.hs b/tests/Network/BitTorrent/DHT/RoutingSpec.hs index aeccff5f..3077a52a 100644 --- a/tests/Network/BitTorrent/DHT/RoutingSpec.hs +++ b/tests/Network/BitTorrent/DHT/RoutingSpec.hs | |||
@@ -1,4 +1,5 @@ | |||
1 | {-# LANGUAGE ScopedTypeVariables #-} | 1 | {-# LANGUAGE ScopedTypeVariables #-} |
2 | {-# LANGUAGE FlexibleContexts #-} | ||
2 | module Network.BitTorrent.DHT.RoutingSpec (spec) where | 3 | module Network.BitTorrent.DHT.RoutingSpec (spec) where |
3 | import Control.Applicative | 4 | import Control.Applicative |
4 | import Control.Monad.State | 5 | import Control.Monad.State |
@@ -73,4 +74,4 @@ spec = do | |||
73 | let t1 = runSimulation e (T.insert n t) | 74 | let t1 = runSimulation e (T.insert n t) |
74 | let t2 = runSimulation e (T.insert n t >>= T.insert n) | 75 | let t2 = runSimulation e (T.insert n t >>= T.insert n) |
75 | t1 `shouldBe` t2 | 76 | t1 `shouldBe` t2 |
76 | -} \ No newline at end of file | 77 | -} |
diff --git a/tests/Network/BitTorrent/Exchange/BitfieldSpec.hs b/tests/Network/BitTorrent/Exchange/BitfieldSpec.hs index 234965fa..1ba772f6 100644 --- a/tests/Network/BitTorrent/Exchange/BitfieldSpec.hs +++ b/tests/Network/BitTorrent/Exchange/BitfieldSpec.hs | |||
@@ -1,13 +1,14 @@ | |||
1 | {-# OPTIONS -fno-warn-orphans #-} | 1 | {-# OPTIONS -fno-warn-orphans #-} |
2 | module Network.BitTorrent.Exchange.BitfieldSpec (spec) where | 2 | module Network.BitTorrent.Exchange.BitfieldSpec (spec) where |
3 | import Control.Applicative | 3 | import Control.Applicative |
4 | import Data.ByteString.Arbitrary | ||
4 | import Test.Hspec | 5 | import Test.Hspec |
5 | import Test.QuickCheck | 6 | import Test.QuickCheck |
6 | 7 | ||
7 | import Network.BitTorrent.Exchange.Bitfield | 8 | import Network.BitTorrent.Exchange.Bitfield |
8 | 9 | ||
9 | instance Arbitrary Bitfield where | 10 | instance Arbitrary Bitfield where |
10 | arbitrary = fromBitmap <$> arbitrary | 11 | arbitrary = fromBitmap . fromABS <$> arbitrary |
11 | 12 | ||
12 | spec :: Spec | 13 | spec :: Spec |
13 | spec = return () \ No newline at end of file | 14 | spec = return () |
diff --git a/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs b/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs index 3a3dddf5..73acb3fa 100644 --- a/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs +++ b/tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs | |||
@@ -18,7 +18,7 @@ import Network.BitTorrent.Tracker.RPC.UDP | |||
18 | 18 | ||
19 | 19 | ||
20 | validateInfo :: AnnounceQuery -> AnnounceInfo -> Expectation | 20 | validateInfo :: AnnounceQuery -> AnnounceInfo -> Expectation |
21 | validateInfo _ Message.Failure {..} = error "validateInfo: failure" | 21 | validateInfo _ Message.Failure {} = error "validateInfo: failure" |
22 | validateInfo AnnounceQuery {..} AnnounceInfo {..} = do | 22 | validateInfo AnnounceQuery {..} AnnounceInfo {..} = do |
23 | respComplete `shouldSatisfy` isJust | 23 | respComplete `shouldSatisfy` isJust |
24 | respIncomplete `shouldSatisfy` isJust | 24 | respIncomplete `shouldSatisfy` isJust |