]> gitweb.michael.orlitzky.com - hath.git/blobdiff - test/TestSuite.hs
Update for QuickCheck 2.
[hath.git] / test / TestSuite.hs
index 897807f9b6216b2f91a3a35ce525648393fcd051..d7cc5fffe7b60141d3d17090820d4bb50336dfb4 100644 (file)
@@ -1,15 +1,32 @@
+{-# LANGUAGE NoMonomorphismRestriction #-}
 import Test.HUnit
+import Test.QuickCheck (Args(..), quickCheckWith, stdArgs)
+
+import Cidr (cidr_tests,
+             prop_all_cidrs_contain_themselves,
+             prop_contains_proper_intransitive)
 
-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
+main :: IO ()
 main = do
+  putStrLn "HUnit"
+  putStrLn "-----"
   runTestTT test_suite
+
+  putStrLn ""
+
+  putStrLn "QuickCheck"
+  putStrLn "----------"
+  qc prop_all_cidrs_contain_themselves
+  qc prop_contains_proper_intransitive
+  where
+    args :: Args
+    args =  stdArgs { maxDiscard = 5000 }
+    qc = quickCheckWith args