X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=test%2FTestSuite.hs;h=baeff14fcade6a662dd4f933e54f11b66faeb21e;hb=27a1f826c3955509af5af8e72028c22afba28ff9;hp=4a0b405695247a6d9d440cd9a87f3e1439d350ba;hpb=205ed82460c2b8c3f94cc30a338f315baa315dbf;p=spline3.git diff --git a/test/TestSuite.hs b/test/TestSuite.hs index 4a0b405..baeff14 100644 --- a/test/TestSuite.hs +++ b/test/TestSuite.hs @@ -1,63 +1,33 @@ -module Main +module Main (main) where -import Data.Monoid (mempty) -import Test.Framework ( - RunnerOptions(), - Test, - TestName, - TestOptions(), - defaultMainWithOpts, - testGroup - ) -import Test.Framework.Options -import Test.Framework.Runners.Options -import Test.Framework.Providers.API (TestName) -import Test.Framework.Providers.HUnit (testCase) -import Test.Framework.Providers.QuickCheck2 (testProperty) -import Test.HUnit -import Test.QuickCheck (Testable ()) +import Test.Tasty ( TestTree, defaultMain, localOption, testGroup ) +import Test.Tasty.QuickCheck ( QuickCheckTests(QuickCheckTests) ) -import Cardinal (cardinal_tests, cardinal_properties) -import Cube (cube_properties) -import FunctionValues (function_values_tests, function_values_properties) -import Grid (grid_tests, slow_tests) -import Misc (misc_tests, misc_properties) -import Tetrahedron (tetrahedron_tests, tetrahedron_properties) +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 - let empty_test_opts = mempty :: TestOptions - let my_test_opts = empty_test_opts { - topt_maximum_generated_tests = Just 500 - } - - let empty_runner_opts = mempty :: RunnerOptions - let my_runner_opts = empty_runner_opts { - ropt_test_options = Just my_test_opts - } - - defaultMainWithOpts tests my_runner_opts - - --- | Defined so that my test names fit on one line. -tc :: Test.Framework.Providers.API.TestName -> Test.HUnit.Assertion -> Test.Framework.Test -tc = testCase - - --- | Defined so that my test names fit on one line. -tp :: Test.QuickCheck.Testable a => Test.Framework.TestName -> a -> Test.Framework.Test -tp = testProperty - - -tests :: [Test.Framework.Test] -tests = [ cardinal_tests, - function_values_tests, - grid_tests, - misc_tests, - tetrahedron_tests, - cube_properties, - tetrahedron_properties, - misc_properties, - cardinal_properties, - slow_tests ] + defaultMain $ localOption (QuickCheckTests 500) tests + + +tests :: TestTree +tests = + testGroup "All tests" + [ cardinal_tests, + function_values_tests, + grid_tests, + misc_tests, + tetrahedron_tests, + function_values_properties, + grid_properties, + cube_properties, + tetrahedron_properties, + misc_properties, + cardinal_properties, + slow_tests ]