X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=test%2FTestSuite.hs;h=8b3da40bae3add8475d5b497913215131aa8974a;hb=fb5b0bd4bda565c50bb833d673662b01b55f1f97;hp=26c6bc943d2ac7d5b7fbabbdc5c491cc41023bae;hpb=89b8b6e94fcc944a1f4611811265f3c6217af850;p=spline3.git diff --git a/test/TestSuite.hs b/test/TestSuite.hs index 26c6bc9..8b3da40 100644 --- a/test/TestSuite.hs +++ b/test/TestSuite.hs @@ -1,87 +1,32 @@ -import Test.HUnit -import Test.QuickCheck +module Main (main) +where -import Tests.Face -import Tests.Misc -import Tests.Tetrahedron +import Test.Tasty ( TestTree, defaultMain, localOption, testGroup ) +import Test.Tasty.QuickCheck ( QuickCheckTests(QuickCheckTests) ) --- The list of HUnit tests. -test_suite = TestList (concat [misc_tests, - tetrahedron_tests]) +import Cardinal ( cardinal_tests, cardinal_properties ) +import Cube ( cube_properties ) +import FunctionValues ( function_values_tests, function_values_properties ) +import Grid ( grid_properties, grid_tests, slow_tests ) +import Misc ( misc_tests, misc_properties ) +import Tetrahedron ( tetrahedron_tests, tetrahedron_properties ) main :: IO () main = do - putStrLn "HUnit" - putStrLn "-----" - runTestTT test_suite - putStrLn "" - putStrLn "QuickCheck" - putStrLn "----------" - let qc_args = stdArgs { maxSuccess = 1000, - maxDiscard = 5000, - maxSize = 1000 } - - putStr "prop_all_volumes_nonnegative... " - quickCheckWith qc_args prop_all_volumes_nonnegative - - putStr "prop_factorial_greater... " - quickCheckWith qc_args prop_factorial_greater - - putStr "prop_b0_v0_always_unity... " - quickCheckWith qc_args prop_b0_v0_always_unity - - putStr "prop_b0_v1_always_zero... " - quickCheckWith qc_args prop_b0_v1_always_zero - - putStr "prop_b0_v2_always_zero... " - quickCheckWith qc_args prop_b0_v2_always_zero - - putStr "prop_b0_v3_always_zero... " - quickCheckWith qc_args prop_b0_v3_always_zero - - putStr "prop_b1_v1_always_unity... " - quickCheckWith qc_args prop_b1_v1_always_unity - - putStr "prop_b1_v0_always_zero... " - quickCheckWith qc_args prop_b1_v0_always_zero - - putStr "prop_b1_v2_always_zero... " - quickCheckWith qc_args prop_b1_v2_always_zero - - putStr "prop_b1_v3_always_zero... " - quickCheckWith qc_args prop_b1_v3_always_zero - - putStr "prop_b2_v2_always_unity... " - quickCheckWith qc_args prop_b2_v2_always_unity - - putStr "prop_b2_v0_always_zero... " - quickCheckWith qc_args prop_b2_v0_always_zero - - putStr "prop_b2_v1_always_zero... " - quickCheckWith qc_args prop_b2_v1_always_zero - - putStr "prop_b2_v3_always_zero... " - quickCheckWith qc_args prop_b2_v3_always_zero - - putStr "prop_b3_v3_always_unity... " - quickCheckWith qc_args prop_b3_v3_always_unity - - putStr "prop_b3_v0_always_zero... " - quickCheckWith qc_args prop_b3_v0_always_zero - - putStr "prop_b3_v1_always_zero... " - quickCheckWith qc_args prop_b3_v1_always_zero - - putStr "prop_b3_v2_always_zero... " - quickCheckWith qc_args prop_b3_v2_always_zero - - putStr "prop_c3000_identity... " - quickCheckWith qc_args prop_c3000_identity - - putStr "prop_c2100_identity... " - quickCheckWith qc_args prop_c2100_identity - - putStr "prop_c1110_identity... " - quickCheckWith qc_args prop_c1110_identity - - return () + defaultMain $ localOption (QuickCheckTests 500) tests + + +tests :: TestTree +tests = + testGroup "All tests" + [ cardinal_tests, + function_values_tests, + grid_tests, + misc_tests, + tetrahedron_tests, + grid_properties, + cube_properties, + tetrahedron_properties, + misc_properties, + cardinal_properties, + slow_tests ]