summaryrefslogtreecommitdiff
path: root/tests/Network/BitTorrent/Core/PeerIdSpec.hs
blob: a4cc30b8f63fd055ae45e882b62040f1eb4f3fe4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# OPTIONS -fno-warn-orphans #-}
module Network.BitTorrent.Core.PeerIdSpec (spec) where
import Control.Applicative
import Data.Text.Encoding as T
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Instances ()
import Network.BitTorrent.Core.PeerId


instance Arbitrary PeerId where
  arbitrary = oneof
    [ azureusStyle defaultClientId defaultVersionNumber
        <$> (T.encodeUtf8 <$> arbitrary)
    , shadowStyle  'X'             defaultVersionNumber
        <$> (T.encodeUtf8 <$> arbitrary)
    ]

spec :: Spec
spec = return ()