diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2013-11-26 06:25:25 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2013-11-26 06:25:25 +0400 |
commit | 0ec645b8e89c9b0177377812f7e4035c2c94ce1b (patch) | |
tree | 51d5cf893bf7eac1ff3494bbf5942e83c113b6c6 /tests/Network/BitTorrent/Core/PeerIdSpec.hs | |
parent | 09e2d9940859b2976e58cdb8f8b06f89a48a0f1a (diff) |
Add Arbitrary instance for AnnounceQuery
Diffstat (limited to 'tests/Network/BitTorrent/Core/PeerIdSpec.hs')
-rw-r--r-- | tests/Network/BitTorrent/Core/PeerIdSpec.hs | 15 |
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 @@ | |||
1 | module Network.BitTorrent.Core.PeerIdSpec (spec) where | ||
2 | import Control.Applicative | ||
3 | import Test.Hspec | ||
4 | import Test.QuickCheck | ||
5 | import Network.BitTorrent.Core.PeerId | ||
6 | |||
7 | |||
8 | instance Arbitrary PeerId where | ||
9 | arbitrary = oneof | ||
10 | [ azureusStyle defaultClientId defaultVersionNumber <$> arbitrary | ||
11 | , shadowStyle 'X' defaultVersionNumber <$> arbitrary | ||
12 | ] | ||
13 | |||
14 | spec :: Spec | ||
15 | spec = return () \ No newline at end of file | ||