X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=test%2FTestSuite.hs;h=bac18ec2365b27038a9a55428d0160b5070009d0;hb=9d123d52885618214e14e9fdefb2f3f43c329ddd;hp=0e11d1c0cfc4cf675862f47af66d4dfa3885a668;hpb=3a954903101eca7594a65824868517b9758e188d;p=spline3.git diff --git a/test/TestSuite.hs b/test/TestSuite.hs index 0e11d1c..bac18ec 100644 --- a/test/TestSuite.hs +++ b/test/TestSuite.hs @@ -1,9 +1,18 @@ -module TestSuite +module Main where -import Test.Framework (defaultMain, testGroup, Test, TestName, TestOptions(..)) +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.DocTest import Test.Framework.Providers.HUnit (testCase) import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.HUnit @@ -18,17 +27,17 @@ import Tetrahedron (tetrahedron_tests, tetrahedron_properties) main :: IO () main = do - dt <- docTest ["src/Everything.hs"] ["-isrc"] - defaultMain $ [dt] ++ tests + let empty_test_opts = mempty :: TestOptions + let my_test_opts = empty_test_opts { + topt_maximum_generated_tests = Just 500 + } --- | Defined so that my test names fit on one line. -tc :: Test.Framework.Providers.API.TestName -> Test.HUnit.Assertion -> Test.Framework.Test -tc = testCase + let empty_runner_opts = mempty :: RunnerOptions + let my_runner_opts = empty_runner_opts { + ropt_test_options = Just my_test_opts + } - --- | Defined so that my test names fit on one line. -tp :: Test.QuickCheck.Testable a => Test.Framework.TestName -> a -> Test.Framework.Test -tp = testProperty + defaultMainWithOpts tests my_runner_opts tests :: [Test.Framework.Test] @@ -39,6 +48,6 @@ tests = [ cardinal_tests, tetrahedron_tests, cube_properties, tetrahedron_properties, - misc_properties, + misc_properties, cardinal_properties, slow_tests ]