X-Git-Url: http://gitweb.michael.orlitzky.com/?p=hath.git;a=blobdiff_plain;f=test%2FTestSuite.hs;h=7cd8d937938b9e245156823ed5e3b393c5b5d3cb;hp=172bcfcb42e9dd649fa64977f35261b8e0aa8d1c;hb=eee156f562f9c1c1194a67cef12f146304d88ce9;hpb=9b637112e7112180e3ddb6129a62b5e21953b469 diff --git a/test/TestSuite.hs b/test/TestSuite.hs index 172bcfc..7cd8d93 100644 --- a/test/TestSuite.hs +++ b/test/TestSuite.hs @@ -1,43 +1,21 @@ -{-# LANGUAGE NoMonomorphismRestriction #-} -import Data.Monoid (mempty) -import Test.Framework ( - Test, - defaultMainWithOpts ) -import Test.Framework.Options -import Test.Framework.Runners.Options +import Test.Tasty ( TestTree, defaultMain, localOption, testGroup ) +import Test.Tasty.QuickCheck ( QuickCheckTests(..), QuickCheckMaxRatio(..) ) +import Cidr ( cidr_properties, cidr_tests ) +import IPv4Address ( ipv4address_properties, ipv4address_tests ) +import Octet ( octet_properties, octet_tests ) -import Cidr ( - cidr_properties, - cidr_tests ) -import IPv4Address ( - ipv4address_properties, - ipv4address_tests ) -import Octet ( - octet_properties, - octet_tests ) - -tests :: [Test.Framework.Test] -tests = [ cidr_properties, +tests :: TestTree +tests = testGroup "All Tests" [ + cidr_properties, cidr_tests, ipv4address_properties, ipv4address_tests, octet_properties, octet_tests ] +-- TODO: Run 5000 generated tests, we have a large space. main :: IO () -main = do - let empty_test_opts = mempty :: TestOptions - let my_test_opts = empty_test_opts { - -- - -- Increase to 5000 when, - -- https://github.com/batterseapower/test-framework/issues/34 - -- is fixed. - -- - 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 tests my_runner_opts +main = + defaultMain $ + localOption (QuickCheckTests 5000) $ + localOption (QuickCheckMaxRatio 50) tests