From 3867719780293528e604452818b9d9a616938783 Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Tue, 8 Apr 2014 03:56:29 +0400 Subject: Move bitfield to exchange subsystem --- tests/Network/BitTorrent/Exchange/BitfieldSpec.hs | 13 +++++++++++++ tests/Network/BitTorrent/Exchange/MessageSpec.hs | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 tests/Network/BitTorrent/Exchange/BitfieldSpec.hs (limited to 'tests/Network/BitTorrent') diff --git a/tests/Network/BitTorrent/Exchange/BitfieldSpec.hs b/tests/Network/BitTorrent/Exchange/BitfieldSpec.hs new file mode 100644 index 00000000..234965fa --- /dev/null +++ b/tests/Network/BitTorrent/Exchange/BitfieldSpec.hs @@ -0,0 +1,13 @@ +{-# OPTIONS -fno-warn-orphans #-} +module Network.BitTorrent.Exchange.BitfieldSpec (spec) where +import Control.Applicative +import Test.Hspec +import Test.QuickCheck + +import Network.BitTorrent.Exchange.Bitfield + +instance Arbitrary Bitfield where + arbitrary = fromBitmap <$> arbitrary + +spec :: Spec +spec = return () \ No newline at end of file diff --git a/tests/Network/BitTorrent/Exchange/MessageSpec.hs b/tests/Network/BitTorrent/Exchange/MessageSpec.hs index f82b034e..d615b1ff 100644 --- a/tests/Network/BitTorrent/Exchange/MessageSpec.hs +++ b/tests/Network/BitTorrent/Exchange/MessageSpec.hs @@ -11,7 +11,7 @@ import Test.Hspec import Test.QuickCheck import Data.TorrentSpec () -import Data.Torrent.BitfieldSpec () +import Network.BitTorrent.Exchange.BitfieldSpec () import Network.BitTorrent.CoreSpec () import Network.BitTorrent.Address () import Network.BitTorrent.Exchange.BlockSpec () -- cgit v1.2.3