diff options
Diffstat (limited to 'tests/Network/BitTorrent/Exchange')
-rw-r--r-- | tests/Network/BitTorrent/Exchange/MessageSpec.hs | 7 |
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 #-} | ||
1 | module Network.BitTorrent.Exchange.MessageSpec (spec) where | 2 | module Network.BitTorrent.Exchange.MessageSpec (spec) where |
2 | import Control.Applicative | 3 | import Control.Applicative |
3 | import Control.Exception | 4 | import Control.Exception |
@@ -22,6 +23,12 @@ instance Arbitrary Extension where | |||
22 | instance Arbitrary Caps where | 23 | instance Arbitrary Caps where |
23 | arbitrary = toCaps <$> arbitrary | 24 | arbitrary = toCaps <$> arbitrary |
24 | 25 | ||
26 | instance Arbitrary ExtendedExtension where | ||
27 | arbitrary = elements [minBound .. maxBound] | ||
28 | |||
29 | instance Arbitrary ExtendedCaps where | ||
30 | arbitrary = toCaps <$> arbitrary | ||
31 | |||
25 | instance Arbitrary ProtocolName where | 32 | instance Arbitrary ProtocolName where |
26 | arbitrary = fromString <$> (arbitrary `suchThat` ((200 <) . L.length)) | 33 | arbitrary = fromString <$> (arbitrary `suchThat` ((200 <) . L.length)) |
27 | 34 | ||