summaryrefslogtreecommitdiff
path: root/tests/Network/BitTorrent/Exchange/BlockSpec.hs
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2013-12-09 06:37:28 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2013-12-09 06:37:28 +0400
commitb00f17874babc0a63a501a4fb33f4f9c8b7d5c7d (patch)
treef945b2fa2ada038a927debc3ba0b8f8fff8733ab /tests/Network/BitTorrent/Exchange/BlockSpec.hs
parentc147b181094937d780b93ca82fb8604deeb9a7cd (diff)
Add stats method to PeerMessage class
Diffstat (limited to 'tests/Network/BitTorrent/Exchange/BlockSpec.hs')
-rw-r--r--tests/Network/BitTorrent/Exchange/BlockSpec.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/Network/BitTorrent/Exchange/BlockSpec.hs b/tests/Network/BitTorrent/Exchange/BlockSpec.hs
new file mode 100644
index 00000000..0712a21d
--- /dev/null
+++ b/tests/Network/BitTorrent/Exchange/BlockSpec.hs
@@ -0,0 +1,16 @@
1module Network.BitTorrent.Exchange.BlockSpec (spec) where
2import Control.Applicative
3import Test.Hspec
4import Test.QuickCheck
5
6import Network.BitTorrent.Exchange.Block
7
8
9instance Arbitrary a => Arbitrary (Block a) where
10 arbitrary = Block <$> arbitrary <*> arbitrary <*> arbitrary
11
12instance Arbitrary BlockIx where
13 arbitrary = BlockIx <$> arbitrary <*> arbitrary <*> arbitrary
14
15spec :: Spec
16spec = return () \ No newline at end of file