]> gitweb.michael.orlitzky.com - hath.git/commitdiff
Added a QuickCheck property verifying that all Cidrs contain themselves.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 14 May 2010 05:20:55 +0000 (01:20 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 14 May 2010 05:20:55 +0000 (01:20 -0400)
src/Cidr.hs

index 7bb3ac2c41229b286f67f39a8ce58c24274171b7..5c9fefd66e6714c5a6eeeb62718ccffd668345b8 100644 (file)
@@ -2,7 +2,8 @@ module Cidr
 ( Cidr(..),
   cidr_from_string,
   cidr_tests,
-  combine_all
+  combine_all,
+  prop_all_cidrs_contain_themselves
 ) where
 
 import Data.List (nubBy)
@@ -289,3 +290,9 @@ cidr_tests = [ test_equality1,
                test_combine_contained1,
                test_combine_contained2
              ]
+
+
+-- QuickCheck Tests
+prop_all_cidrs_contain_themselves :: Cidr -> Bool
+prop_all_cidrs_contain_themselves cidr1 = cidr1 `contains` cidr1
+