From: Michael Orlitzky Date: Fri, 14 May 2010 05:20:55 +0000 (-0400) Subject: Added a QuickCheck property verifying that all Cidrs contain themselves. X-Git-Tag: 0.0.1~42 X-Git-Url: http://gitweb.michael.orlitzky.com/?p=hath.git;a=commitdiff_plain;h=0be56eaa64ab03adf3aa1f3f3c14a191c09045c8 Added a QuickCheck property verifying that all Cidrs contain themselves. --- diff --git a/src/Cidr.hs b/src/Cidr.hs index 7bb3ac2..5c9fefd 100644 --- a/src/Cidr.hs +++ b/src/Cidr.hs @@ -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 +