octet_tests )
where
-import Test.QuickCheck ( Gen ) -- Not re-exported by tasty
import Test.Tasty ( TestTree, testGroup )
import Test.Tasty.HUnit ( (@?=), testCase )
import Test.Tasty.QuickCheck (
Arbitrary(..),
+ Gen,
Property,
(==>),
testProperty )
where
desc = "octet_from_int 128 should parse as 10000000"
expected = Octet B.One B.Zero B.Zero B.Zero B.Zero B.Zero B.Zero B.Zero
- actual = toEnum 128
+ actual = toEnum 128 :: Octet
test_octet_mask1 :: TestTree
where
desc = "The network bits of 255/4 should equal 240"
expected = toEnum 240 :: Octet
- actual = apply_mask (toEnum 255) Four B.Zero
+ actual = apply_mask (toEnum 255) Four B.Zero :: Octet
test_octet_mask2 :: TestTree
where
desc = "The network bits of 255/1 should equal 128"
expected = toEnum 128 :: Octet
- actual = apply_mask (toEnum 255) Maskbits.One B.Zero
+ actual = apply_mask (toEnum 255) Maskbits.One B.Zero :: Octet