-- HUnit Tests
+test_octet_mask1 :: Test
test_octet_mask1 =
TestCase $ assertEqual "The network bits of 255/4 should equal 240" oct2 (apply_mask oct1 Four)
where
oct2 = octet_from_int 240
+test_octet_mask2 :: Test
test_octet_mask2 =
TestCase $ assertEqual "The network bits of 255/1 should equal 128" oct2 (apply_mask oct1 One)
where
oct2 = octet_from_int 128
+maskable_tests :: [Test]
maskable_tests = [ test_octet_mask1,
test_octet_mask2 ]