From 08eeeaa520b08858af9efafe8ad921dc6e7a46e1 Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Fri, 13 Dec 2013 08:24:58 +0400 Subject: Expose tracker RPC module --- tests/Network/BitTorrent/Exchange/BlockSpec.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/Network/BitTorrent/Exchange') diff --git a/tests/Network/BitTorrent/Exchange/BlockSpec.hs b/tests/Network/BitTorrent/Exchange/BlockSpec.hs index 158a30b4..f4301452 100644 --- a/tests/Network/BitTorrent/Exchange/BlockSpec.hs +++ b/tests/Network/BitTorrent/Exchange/BlockSpec.hs @@ -1,5 +1,6 @@ module Network.BitTorrent.Exchange.BlockSpec (spec) where import Control.Applicative +import Data.Maybe import Test.Hspec import Test.QuickCheck @@ -12,8 +13,14 @@ instance Arbitrary a => Arbitrary (Block a) where instance Arbitrary BlockIx where arbitrary = BlockIx <$> arbitrary <*> arbitrary <*> arbitrary +instance Arbitrary Bucket where + arbitrary = error "arbitrary: block bucket" + +instance Show Bucket where + show = error "show: bucket" + spec :: Spec spec = do describe "bucket" $ do it "render to piece when it is full" $ property $ \ bkt -> - if full bkt then isJust (toPiece bkt) \ No newline at end of file + full bkt == isJust (toPiece bkt) \ No newline at end of file -- cgit v1.2.3