+test_enumerate :: TestTree
+test_enumerate =
+ testCase desc $ actual @?= expected
+ where
+ desc = "192.168.0.240/30 is enumerated correctly"
+ oct1 = toEnum 192
+ oct2 = toEnum 168
+ oct3 = minBound
+ mk_ip = IPv4Address oct1 oct2 oct3
+ addr1 = mk_ip $ toEnum 240
+ addr2 = mk_ip $ toEnum 241
+ addr3 = mk_ip $ toEnum 242
+ addr4 = mk_ip $ toEnum 243
+ expected = [addr1, addr2, addr3, addr4]
+ actual = enumerate $ read "192.168.0.240/30"
+
+test_min_host1 :: TestTree