Skip to content

Commit d451a96

Browse files
committed
Use test-framework to run tests
1 parent d17f7ce commit d451a96

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

configurator.cabal

+2
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,7 @@ test-suite unit-tests
9494
unordered-containers,
9595
unix-compat,
9696
hashable,
97+
test-framework,
98+
test-framework-hunit,
9799
bytestring
98100
Ghc-options: -Wall -fno-warn-unused-do-bind

tests/Test.hs

+13-11
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,21 @@ import System.Directory
2020
import System.Environment
2121
import System.FilePath
2222
import System.IO
23-
import Test.HUnit
23+
import Test.Framework
24+
import Test.Framework.Providers.HUnit
25+
import Test.HUnit hiding (Test)
2426

2527
main :: IO ()
26-
main = runTestTT tests >> return ()
27-
28-
tests :: Test
29-
tests = TestList
30-
[ "load" ~: loadTest
31-
, "types" ~: typesTest
32-
, "interp" ~: interpTest
33-
, "scoped-interp" ~: scopedInterpTest
34-
, "import" ~: importTest
35-
, "reload" ~: reloadTest
28+
main = defaultMain tests
29+
30+
tests :: [Test]
31+
tests =
32+
[ testCase "load" loadTest
33+
, testCase "types" typesTest
34+
, testCase "interp" interpTest
35+
, testCase "scoped-interp" scopedInterpTest
36+
, testCase "import" importTest
37+
, testCase "reload" reloadTest
3638
]
3739

3840
withLoad :: FilePath -> (Config -> IO ()) -> IO ()

0 commit comments

Comments
 (0)