diff options
Diffstat (limited to 'Biz/Test.hs')
-rw-r--r-- | Biz/Test.hs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Biz/Test.hs b/Biz/Test.hs index 0a2cf2f..508703b 100644 --- a/Biz/Test.hs +++ b/Biz/Test.hs @@ -2,6 +2,8 @@ module Biz.Test ( Tree, + Description, + Assertion, run, group, none, @@ -24,6 +26,10 @@ import qualified Test.Tasty.Runners as Tasty type Tree = Tasty.TestTree +type Description = Tasty.TestName + +type Assertion = HUnit.Assertion + run :: Tree -> IO () run tree = do Tasty.installSignalHandlers @@ -33,16 +39,16 @@ run tree = do exitFailure Just act -> act +> \ok -> if ok then exitSuccess else exitFailure -group :: Tasty.TestName -> [Tasty.TestTree] -> Tasty.TestTree +group :: Description -> [Tasty.TestTree] -> Tree group = Tasty.testGroup -unit :: Tasty.TestName -> HUnit.Assertion -> Tasty.TestTree +unit :: Description -> Assertion -> Tree unit = HUnit.testCase -prop :: QuickCheck.Testable a => Tasty.TestName -> a -> Tasty.TestTree +prop :: QuickCheck.Testable a => Description -> a -> Tree prop = QuickCheck.testProperty -assertFailure :: String -> HUnit.Assertion +assertFailure :: String -> Assertion assertFailure = HUnit.assertFailure with :: |