X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=test%2FTestSuite.hs;h=32b81e220f67616cd14760e2db3eafceffd190b6;hb=6087bef9274022251014f4ecbd166c35710480cd;hp=3c00d06cab0473c8f3891b4e31739ef716cc0114;hpb=4520812e6f264cdeba984d180f20a8f8c6b6d645;p=hath.git diff --git a/test/TestSuite.hs b/test/TestSuite.hs index 3c00d06..32b81e2 100644 --- a/test/TestSuite.hs +++ b/test/TestSuite.hs @@ -1,32 +1,22 @@ -import Test.HUnit -import Test.QuickCheck.Batch +import Test.Tasty( TestTree, defaultMain, localOption, testGroup ) +import Test.Tasty.QuickCheck( + QuickCheckTests( QuickCheckTests), + QuickCheckMaxRatio( QuickCheckMaxRatio )) +import Cidr( cidr_properties, cidr_tests ) +import IPv4Address( ipv4address_properties, ipv4address_tests ) +import Octet( octet_properties, octet_tests ) -import Cidr (cidr_tests, - prop_all_cidrs_contain_themselves, - prop_contains_proper_intransitive) - -import IPv4Address (ipv4address_tests) -import Octet (octet_tests) - --- The list of HUnit tests. -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 } +tests :: TestTree +tests = testGroup "All Tests" [ + cidr_properties, + cidr_tests, + ipv4address_properties, + ipv4address_tests, + octet_properties, + octet_tests ] main :: IO () -main = do - putStrLn "HUnit" - putStrLn "-----" - runTestTT test_suite - - putStrLn "" - - putStrLn "QuickCheck" - putStrLn "----------" - runTests "Cidr" options [ run prop_all_cidrs_contain_themselves, - run prop_contains_proper_intransitive] +main = + defaultMain $ + localOption (QuickCheckTests 5000) $ + localOption (QuickCheckMaxRatio 50) tests