summaryrefslogtreecommitdiff
path: root/tests/Network
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Network')
-rw-r--r--tests/Network/BitTorrent/Exchange/MessageSpec.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/Network/BitTorrent/Exchange/MessageSpec.hs b/tests/Network/BitTorrent/Exchange/MessageSpec.hs
index 6a794ce2..63d814ff 100644
--- a/tests/Network/BitTorrent/Exchange/MessageSpec.hs
+++ b/tests/Network/BitTorrent/Exchange/MessageSpec.hs
@@ -1,3 +1,4 @@
1{-# OPTIONS_GHC -fno-warn-orphans #-}
1module Network.BitTorrent.Exchange.MessageSpec (spec) where 2module Network.BitTorrent.Exchange.MessageSpec (spec) where
2import Control.Applicative 3import Control.Applicative
3import Control.Exception 4import Control.Exception
@@ -22,6 +23,12 @@ instance Arbitrary Extension where
22instance Arbitrary Caps where 23instance Arbitrary Caps where
23 arbitrary = toCaps <$> arbitrary 24 arbitrary = toCaps <$> arbitrary
24 25
26instance Arbitrary ExtendedExtension where
27 arbitrary = elements [minBound .. maxBound]
28
29instance Arbitrary ExtendedCaps where
30 arbitrary = toCaps <$> arbitrary
31
25instance Arbitrary ProtocolName where 32instance Arbitrary ProtocolName where
26 arbitrary = fromString <$> (arbitrary `suchThat` ((200 <) . L.length)) 33 arbitrary = fromString <$> (arbitrary `suchThat` ((200 <) . L.length))
27 34