]> gitweb.michael.orlitzky.com - hath.git/blobdiff - test/TestSuite.hs
Update for QuickCheck 2.
[hath.git] / test / TestSuite.hs
index 3c00d06cab0473c8f3891b4e31739ef716cc0114..d7cc5fffe7b60141d3d17090820d4bb50336dfb4 100644 (file)
@@ -1,5 +1,6 @@
+{-# LANGUAGE NoMonomorphismRestriction #-}
 import Test.HUnit
-import Test.QuickCheck.Batch
+import Test.QuickCheck (Args(..), quickCheckWith, stdArgs)
 
 import Cidr (cidr_tests,
              prop_all_cidrs_contain_themselves,
@@ -13,11 +14,6 @@ test_suite = TestList (concat [cidr_tests,
                                ipv4address_tests,
                                octet_tests])
 
--- 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"
@@ -28,5 +24,9 @@ main = do
 
   putStrLn "QuickCheck"
   putStrLn "----------"
-  runTests "Cidr" options [ run prop_all_cidrs_contain_themselves,
-                            run prop_contains_proper_intransitive]
+  qc prop_all_cidrs_contain_themselves
+  qc prop_contains_proper_intransitive
+  where
+    args :: Args
+    args =  stdArgs { maxDiscard = 5000 }
+    qc = quickCheckWith args