summaryrefslogtreecommitdiff
path: root/tests/Network
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-01-01 01:10:44 -0500
committerjoe <joe@jerkface.net>2017-01-01 01:10:44 -0500
commit80c860df8c29f99e0a82b454c1c0f0c6902764ef (patch)
treeafb7a07440b308179252f7e5a79cc85870705358 /tests/Network
parentb0cb559c503e791c2a2297a6316d59dab6c49202 (diff)
Fixed build of testsuite.
Diffstat (limited to 'tests/Network')
-rw-r--r--tests/Network/BitTorrent/DHT/RoutingSpec.hs3
-rw-r--r--tests/Network/BitTorrent/Exchange/BitfieldSpec.hs5
-rw-r--r--tests/Network/BitTorrent/Tracker/RPC/UDPSpec.hs2
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 #-}
2module Network.BitTorrent.DHT.RoutingSpec (spec) where 3module Network.BitTorrent.DHT.RoutingSpec (spec) where
3import Control.Applicative 4import Control.Applicative
4import Control.Monad.State 5import 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 #-}
2module Network.BitTorrent.Exchange.BitfieldSpec (spec) where 2module Network.BitTorrent.Exchange.BitfieldSpec (spec) where
3import Control.Applicative 3import Control.Applicative
4import Data.ByteString.Arbitrary
4import Test.Hspec 5import Test.Hspec
5import Test.QuickCheck 6import Test.QuickCheck
6 7
7import Network.BitTorrent.Exchange.Bitfield 8import Network.BitTorrent.Exchange.Bitfield
8 9
9instance Arbitrary Bitfield where 10instance Arbitrary Bitfield where
10 arbitrary = fromBitmap <$> arbitrary 11 arbitrary = fromBitmap . fromABS <$> arbitrary
11 12
12spec :: Spec 13spec :: Spec
13spec = return () \ No newline at end of file 14spec = 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
20validateInfo :: AnnounceQuery -> AnnounceInfo -> Expectation 20validateInfo :: AnnounceQuery -> AnnounceInfo -> Expectation
21validateInfo _ Message.Failure {..} = error "validateInfo: failure" 21validateInfo _ Message.Failure {} = error "validateInfo: failure"
22validateInfo AnnounceQuery {..} AnnounceInfo {..} = do 22validateInfo AnnounceQuery {..} AnnounceInfo {..} = do
23 respComplete `shouldSatisfy` isJust 23 respComplete `shouldSatisfy` isJust
24 respIncomplete `shouldSatisfy` isJust 24 respIncomplete `shouldSatisfy` isJust