From 1ba6b199192c6b5bddb486446ebfeff88a6309b9 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 14 May 2010 01:29:25 -0400 Subject: [PATCH] Added the QuickCheck tests to the test suite. --- test/TestSuite.hs | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/test/TestSuite.hs b/test/TestSuite.hs index 897807f..3538d21 100644 --- a/test/TestSuite.hs +++ b/test/TestSuite.hs @@ -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 ] -- 2.43.2