summaryrefslogtreecommitdiff
path: root/tests/Network/BitTorrent/Exchange/MessageSpec.hs
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2014-02-24 16:53:28 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2014-02-24 16:53:28 +0400
commitc5114183d5e9776b8bcce9809384dabb702d1b23 (patch)
tree48b6f018f500b2b02600a582ca0ebb329730c92f /tests/Network/BitTorrent/Exchange/MessageSpec.hs
parentcfc2d89cef8655e8fea2e3cf45b2618842928886 (diff)
Add missing instances
Diffstat (limited to 'tests/Network/BitTorrent/Exchange/MessageSpec.hs')
-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