From 0be56eaa64ab03adf3aa1f3f3c14a191c09045c8 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 14 May 2010 01:20:55 -0400 Subject: [PATCH] Added a QuickCheck property verifying that all Cidrs contain themselves. --- src/Cidr.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 + -- 2.43.2