From: Michael Orlitzky Date: Tue, 4 Oct 2011 03:54:33 +0000 (-0400) Subject: Use test options to specify a 1000-test requirement. X-Git-Tag: 0.0.1~109 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=1d371234dc06d20b59d8b42a46e42aebf430b9f4;p=spline3.git Use test options to specify a 1000-test requirement. --- diff --git a/test/TestSuite.hs b/test/TestSuite.hs index 0e11d1c..b021fa3 100644 --- a/test/TestSuite.hs +++ b/test/TestSuite.hs @@ -1,7 +1,17 @@ module TestSuite 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) @@ -19,7 +29,19 @@ 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 1000 + } + + let empty_runner_opts = mempty :: RunnerOptions + let my_runner_opts = empty_runner_opts { + ropt_test_options = Just my_test_opts + } + + defaultMainWithOpts ([dt] ++ 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