summaryrefslogtreecommitdiff
path: root/tests/Network/BitTorrent/Core
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2013-11-26 06:25:25 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2013-11-26 06:25:25 +0400
commit0ec645b8e89c9b0177377812f7e4035c2c94ce1b (patch)
tree51d5cf893bf7eac1ff3494bbf5942e83c113b6c6 /tests/Network/BitTorrent/Core
parent09e2d9940859b2976e58cdb8f8b06f89a48a0f1a (diff)
Add Arbitrary instance for AnnounceQuery
Diffstat (limited to 'tests/Network/BitTorrent/Core')
-rw-r--r--tests/Network/BitTorrent/Core/PeerIdSpec.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/Network/BitTorrent/Core/PeerIdSpec.hs b/tests/Network/BitTorrent/Core/PeerIdSpec.hs
new file mode 100644
index 00000000..7ed8a976
--- /dev/null
+++ b/tests/Network/BitTorrent/Core/PeerIdSpec.hs
@@ -0,0 +1,15 @@
1module Network.BitTorrent.Core.PeerIdSpec (spec) where
2import Control.Applicative
3import Test.Hspec
4import Test.QuickCheck
5import Network.BitTorrent.Core.PeerId
6
7
8instance Arbitrary PeerId where
9 arbitrary = oneof
10 [ azureusStyle defaultClientId defaultVersionNumber <$> arbitrary
11 , shadowStyle 'X' defaultVersionNumber <$> arbitrary
12 ]
13
14spec :: Spec
15spec = return () \ No newline at end of file