]> gitweb.michael.orlitzky.com - hath.git/commitdiff
Added the QuickCheck tests to the test suite.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 14 May 2010 05:29:25 +0000 (01:29 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 14 May 2010 05:29:25 +0000 (01:29 -0400)
test/TestSuite.hs

index 897807f9b6216b2f91a3a35ce525648393fcd051..3538d21141455e8d6938cdae4ff59fc3f497be43 100644 (file)
@@ -1,15 +1,32 @@
 import Test.HUnit
+import Test.QuickCheck.Batch
+
+import Cidr (cidr_tests,
+             prop_all_cidrs_contain_themselves)
 
-import Cidr (cidr_tests)
 import IPv4Address (ipv4address_tests)
 import Maskable (maskable_tests)
 import Octet (octet_tests)
 
+-- The list of HUnit tests.
 test_suite = TestList (concat [cidr_tests,
                                ipv4address_tests,
                                maskable_tests,
                                octet_tests])
 
-main :: IO Counts
+-- QuickCheck options
+options = TestOptions { no_of_tests     = 1000,
+                        length_of_tests = 0, -- No time limit on tests.
+                        debug_tests     = False }
+
+main :: IO ()
 main = do
+  putStrLn "HUnit"
+  putStrLn "-----"
   runTestTT test_suite
+
+  putStrLn ""
+
+  putStrLn "QuickCheck"
+  putStrLn "----------"
+  runTests "Cidr" options [ run prop_all_cidrs_contain_themselves ]