Permalink
Browse files

Use test-framework to run tests

  • Loading branch information...
1 parent d17f7ce commit d451a96d1f56d63ed44ddc0ed66e15fdda08854a @bos committed Jul 2, 2014
Showing with 15 additions and 11 deletions.
  1. +2 −0 configurator.cabal
  2. +13 −11 tests/Test.hs
View
@@ -94,5 +94,7 @@ test-suite unit-tests
unordered-containers,
unix-compat,
hashable,
+ test-framework,
+ test-framework-hunit,
bytestring
Ghc-options: -Wall -fno-warn-unused-do-bind
View
@@ -20,19 +20,21 @@ import System.Directory
import System.Environment
import System.FilePath
import System.IO
-import Test.HUnit
+import Test.Framework
+import Test.Framework.Providers.HUnit
+import Test.HUnit hiding (Test)
main :: IO ()
-main = runTestTT tests >> return ()
-
-tests :: Test
-tests = TestList
- [ "load" ~: loadTest
- , "types" ~: typesTest
- , "interp" ~: interpTest
- , "scoped-interp" ~: scopedInterpTest
- , "import" ~: importTest
- , "reload" ~: reloadTest
+main = defaultMain tests
+
+tests :: [Test]
+tests =
+ [ testCase "load" loadTest
+ , testCase "types" typesTest
+ , testCase "interp" interpTest
+ , testCase "scoped-interp" scopedInterpTest
+ , testCase "import" importTest
+ , testCase "reload" reloadTest
]
withLoad :: FilePath -> (Config -> IO ()) -> IO ()

0 comments on commit d451a96

Please sign in to comment.