diff options
Diffstat (limited to 'tests/Network/BitTorrent/DHT')
-rw-r--r-- | tests/Network/BitTorrent/DHT/MessageSpec.hs | 6 | ||||
-rw-r--r-- | tests/Network/BitTorrent/DHT/TokenSpec.hs | 14 |
2 files changed, 17 insertions, 3 deletions
diff --git a/tests/Network/BitTorrent/DHT/MessageSpec.hs b/tests/Network/BitTorrent/DHT/MessageSpec.hs index 11a8fb15..ce2ac0de 100644 --- a/tests/Network/BitTorrent/DHT/MessageSpec.hs +++ b/tests/Network/BitTorrent/DHT/MessageSpec.hs | |||
@@ -12,9 +12,9 @@ import Network.Socket (PortNumber) | |||
12 | import Test.Hspec | 12 | import Test.Hspec |
13 | import Test.QuickCheck | 13 | import Test.QuickCheck |
14 | 14 | ||
15 | import Network.BitTorrent.CoreSpec () | 15 | import Network.BitTorrent.CoreSpec () |
16 | import Data.Torrent.InfoHashSpec () | 16 | import Network.BitTorrent.DHT.TokenSpec () |
17 | 17 | import Data.Torrent.InfoHashSpec () | |
18 | 18 | ||
19 | remoteAddr :: SockAddr | 19 | remoteAddr :: SockAddr |
20 | remoteAddr = SockAddrInet 6881 (256 * 256 * 256 + 127) | 20 | remoteAddr = SockAddrInet 6881 (256 * 256 * 256 + 127) |
diff --git a/tests/Network/BitTorrent/DHT/TokenSpec.hs b/tests/Network/BitTorrent/DHT/TokenSpec.hs new file mode 100644 index 00000000..90ff0f03 --- /dev/null +++ b/tests/Network/BitTorrent/DHT/TokenSpec.hs | |||
@@ -0,0 +1,14 @@ | |||
1 | {-# OPTIONS_GHC -fno-warn-orphans #-} | ||
2 | module Network.BitTorrent.DHT.TokenSpec (spec) where | ||
3 | import Control.Applicative | ||
4 | import Data.String | ||
5 | import Test.Hspec | ||
6 | import Test.QuickCheck | ||
7 | import Network.BitTorrent.DHT.Token | ||
8 | |||
9 | |||
10 | instance Arbitrary Token where | ||
11 | arbitrary = fromString <$> arbitrary | ||
12 | |||
13 | spec :: Spec | ||
14 | spec = return () \ No newline at end of file | ||