]> gitweb.michael.orlitzky.com - hath.git/blob - test/TestSuite.hs
Use test-framework for the tests, and bump some dependencies.
[hath.git] / test / TestSuite.hs
1 {-# LANGUAGE NoMonomorphismRestriction #-}
2 import Data.Monoid (mempty)
3 import Test.Framework (
4 RunnerOptions(),
5 Test,
6 TestName,
7 TestOptions(),
8 defaultMainWithOpts,
9 testGroup
10 )
11 import Test.Framework.Options
12 import Test.Framework.Runners.Options
13 import Test.Framework.Providers.API (TestName)
14 import Test.Framework.Providers.HUnit (testCase)
15 import Test.Framework.Providers.QuickCheck2 (testProperty)
16 import Test.HUnit
17 import Test.QuickCheck (Testable ())
18
19 import Cidr (cidr_properties, cidr_tests)
20
21 import IPv4Address (ipv4address_tests)
22 import Octet (octet_tests)
23
24 tests :: [Test.Framework.Test]
25 tests = [ cidr_properties,
26 cidr_tests,
27 ipv4address_tests,
28 octet_tests ]
29
30 main :: IO ()
31 main = do
32 let empty_test_opts = mempty :: TestOptions
33 let my_test_opts = empty_test_opts {
34 --
35 -- Increase to 5000 when,
36 -- https://github.com/batterseapower/test-framework/issues/34
37 -- is fixed.
38 --
39 topt_maximum_generated_tests = Just 1000
40 }
41 let empty_runner_opts = mempty :: RunnerOptions
42 let my_runner_opts = empty_runner_opts {
43 ropt_test_options = Just my_test_opts
44 }
45
46 defaultMainWithOpts tests my_runner_opts