From 085d3368ad94a4e1a413a305876b829ffdcefbcf Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Fri, 13 Dec 2013 06:02:22 +0400 Subject: Add a test for block bucket --- tests/Network/BitTorrent/Exchange/BlockSpec.hs | 5 ++++- 1 file changed, 4 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 0712a21d..158a30b4 100644 --- a/tests/Network/BitTorrent/Exchange/BlockSpec.hs +++ b/tests/Network/BitTorrent/Exchange/BlockSpec.hs @@ -13,4 +13,7 @@ instance Arbitrary BlockIx where arbitrary = BlockIx <$> arbitrary <*> arbitrary <*> arbitrary spec :: Spec -spec = return () \ No newline at end of file +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 -- cgit v1.2.3