X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=test%2FTestSuite.hs;h=d7cc5fffe7b60141d3d17090820d4bb50336dfb4;hb=9200fe5fcab505e5a331514a6ee687c6f78011b1;hp=4450f1d34001afaf731f17159492c09e6501c7b1;hpb=a23ed449c784cdf81501c696bec10b1fbaeefc5f;p=hath.git diff --git a/test/TestSuite.hs b/test/TestSuite.hs index 4450f1d..d7cc5ff 100644 --- a/test/TestSuite.hs +++ b/test/TestSuite.hs @@ -1,25 +1,19 @@ +{-# LANGUAGE NoMonomorphismRestriction #-} import Test.HUnit -import Test.QuickCheck.Batch +import Test.QuickCheck (Args(..), quickCheckWith, stdArgs) import Cidr (cidr_tests, prop_all_cidrs_contain_themselves, prop_contains_proper_intransitive) 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]) --- 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" @@ -30,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