X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FIPv4Address.hs;h=e91e67325a070abde0a0af82afd2d05a3175bc4d;hb=103f95bf9bf2ad9908ec7a82691b81b1182774c7;hp=29afa5f3dd2c34264a98b39c250d93b5160db6af;hpb=d1e7f72b70cfe4c1a5c5eb6e7773888506833131;p=hath.git diff --git a/src/IPv4Address.hs b/src/IPv4Address.hs index 29afa5f..e91e673 100644 --- a/src/IPv4Address.hs +++ b/src/IPv4Address.hs @@ -355,14 +355,16 @@ mk_testaddr a b c d = oct4 = octet_from_int d +test_most_sig_bit_different1 :: Test test_most_sig_bit_different1 = TestCase $ assertEqual "10.1.1.0 and 10.1.0.0 differ in bit 24" TwentyFour (most_sig_bit_different (mk_testaddr 10 1 1 0) (mk_testaddr 10 1 0 0)) +test_most_sig_bit_different2 :: Test test_most_sig_bit_different2 = TestCase $ assertEqual "10.1.2.0 and 10.1.1.0 differ in bit 23" TwentyThree (most_sig_bit_different (mk_testaddr 10 1 2 0) (mk_testaddr 10 1 1 0)) - +ipv4address_tests :: [Test] ipv4address_tests = [ test_most_sig_bit_different1, test_most_sig_bit_different2 ]