From c5114183d5e9776b8bcce9809384dabb702d1b23 Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Mon, 24 Feb 2014 16:53:28 +0400 Subject: Add missing instances --- tests/Network/BitTorrent/Exchange/MessageSpec.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/Network') 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 @@ +{-# OPTIONS_GHC -fno-warn-orphans #-} module Network.BitTorrent.Exchange.MessageSpec (spec) where import Control.Applicative import Control.Exception @@ -22,6 +23,12 @@ instance Arbitrary Extension where instance Arbitrary Caps where arbitrary = toCaps <$> arbitrary +instance Arbitrary ExtendedExtension where + arbitrary = elements [minBound .. maxBound] + +instance Arbitrary ExtendedCaps where + arbitrary = toCaps <$> arbitrary + instance Arbitrary ProtocolName where arbitrary = fromString <$> (arbitrary `suchThat` ((200 <) . L.length)) -- cgit v1.2.3