]> gitweb.michael.orlitzky.com - spline3.git/blob - test/TestSuite.hs
Bump the cmdargs dep to 0.10.*.
[spline3.git] / test / TestSuite.hs
1 module Main
2 where
3
4 import Data.Monoid (mempty)
5 import Test.Framework (
6 RunnerOptions(),
7 Test,
8 TestName,
9 TestOptions(),
10 defaultMainWithOpts,
11 testGroup
12 )
13 import Test.Framework.Options
14 import Test.Framework.Runners.Options
15 import Test.Framework.Providers.API (TestName)
16 import Test.Framework.Providers.HUnit (testCase)
17 import Test.Framework.Providers.QuickCheck2 (testProperty)
18 import Test.HUnit
19 import Test.QuickCheck (Testable ())
20
21 import Cardinal (cardinal_tests, cardinal_properties)
22 import Cube (cube_properties)
23 import FunctionValues (function_values_tests, function_values_properties)
24 import Grid (grid_tests, slow_tests)
25 import Misc (misc_tests, misc_properties)
26 import Tetrahedron (tetrahedron_tests, tetrahedron_properties)
27
28 main :: IO ()
29 main = do
30 let empty_test_opts = mempty :: TestOptions
31 let my_test_opts = empty_test_opts {
32 topt_maximum_generated_tests = Just 500
33 }
34
35 let empty_runner_opts = mempty :: RunnerOptions
36 let my_runner_opts = empty_runner_opts {
37 ropt_test_options = Just my_test_opts
38 }
39
40 defaultMainWithOpts tests my_runner_opts
41
42
43 -- | Defined so that my test names fit on one line.
44 tc :: Test.Framework.Providers.API.TestName -> Test.HUnit.Assertion -> Test.Framework.Test
45 tc = testCase
46
47
48 -- | Defined so that my test names fit on one line.
49 tp :: Test.QuickCheck.Testable a => Test.Framework.TestName -> a -> Test.Framework.Test
50 tp = testProperty
51
52
53 tests :: [Test.Framework.Test]
54 tests = [ cardinal_tests,
55 function_values_tests,
56 grid_tests,
57 misc_tests,
58 tetrahedron_tests,
59 cube_properties,
60 tetrahedron_properties,
61 misc_properties,
62 cardinal_properties,
63 slow_tests ]