X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FMaskable.hs;h=4f028a02ae519b731a5922479a7bd01a2370179d;hb=a767881c16a119a90ff80d9c14106348d8bc310d;hp=9300ee1fcf2ae00e28bf361573dde0964aa9d938;hpb=e47dd37f1757c8ada0c1e25f41af5fa83952c91f;p=hath.git diff --git a/src/Maskable.hs b/src/Maskable.hs index 9300ee1..4f028a0 100644 --- a/src/Maskable.hs +++ b/src/Maskable.hs @@ -85,6 +85,7 @@ instance Maskable IPv4Address where -- 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 @@ -92,6 +93,7 @@ test_octet_mask1 = 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 @@ -99,5 +101,6 @@ test_octet_mask2 = oct2 = octet_from_int 128 +maskable_tests :: [Test] maskable_tests = [ test_octet_mask1, test_octet_mask2 ]