]> gitweb.michael.orlitzky.com - spline3.git/blob - test/TestSuite.hs
Add a cabal file.
[spline3.git] / test / TestSuite.hs
1 module TestSuite
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.DocTest
17 import Test.Framework.Providers.HUnit (testCase)
18 import Test.Framework.Providers.QuickCheck2 (testProperty)
19 import Test.HUnit
20 import Test.QuickCheck (Testable ())
21
22 import Cardinal (cardinal_tests, cardinal_properties)
23 import Cube (cube_properties)
24 import FunctionValues (function_values_tests, function_values_properties)
25 import Grid (grid_tests, slow_tests)
26 import Misc (misc_tests, misc_properties)
27 import Tetrahedron (tetrahedron_tests, tetrahedron_properties)
28
29 main :: IO ()
30 main = do
31 dt <- docTest ["src/Everything.hs"] ["-isrc"]
32
33 let empty_test_opts = mempty :: TestOptions
34 let my_test_opts = empty_test_opts {
35 topt_maximum_generated_tests = Just 1000
36 }
37
38 let empty_runner_opts = mempty :: RunnerOptions
39 let my_runner_opts = empty_runner_opts {
40 ropt_test_options = Just my_test_opts
41 }
42
43 defaultMainWithOpts ([dt] ++ tests) my_runner_opts
44
45
46 -- | Defined so that my test names fit on one line.
47 tc :: Test.Framework.Providers.API.TestName -> Test.HUnit.Assertion -> Test.Framework.Test
48 tc = testCase
49
50
51 -- | Defined so that my test names fit on one line.
52 tp :: Test.QuickCheck.Testable a => Test.Framework.TestName -> a -> Test.Framework.Test
53 tp = testProperty
54
55
56 tests :: [Test.Framework.Test]
57 tests = [ cardinal_tests,
58 function_values_tests,
59 grid_tests,
60 misc_tests,
61 tetrahedron_tests,
62 cube_properties,
63 tetrahedron_properties,
64 misc_properties,
65 cardinal_properties,
66 slow_tests ]