| ||||||||||||||||||||
| ||||||||||||||||||||
| ||||||||||||||||||||
Description | ||||||||||||||||||||
This is just a simple one-module unit test framework, with the same API as Test.HUnit (albeit with a lot of stuff missing). We use it because it works in CaughtMonadIO instead of IO (and also because I couldn't convert Test.HUnit to use CaughtMonadIO). | ||||||||||||||||||||
Synopsis | ||||||||||||||||||||
| ||||||||||||||||||||
Primary API | ||||||||||||||||||||
runTestTT :: CaughtMonadIO m => String -> [m ()] -> m Int | ||||||||||||||||||||
Return 0 if everything is rosy, 1 if there were assertion failures (but no exceptions), 2 if there were any exceptions. You could use this return code as the return code from your program, if you're driving from the command line. | ||||||||||||||||||||
assertFailure :: CaughtMonadIO m => String -> m () | ||||||||||||||||||||
assertBool :: CaughtMonadIO m => String -> Bool -> m () | ||||||||||||||||||||
assertString :: CaughtMonadIO m => String -> m () | ||||||||||||||||||||
assertEqual | ||||||||||||||||||||
| ||||||||||||||||||||
Exposed for self-testing only; see Test.MiniUnitTest | ||||||||||||||||||||
data TestResult | ||||||||||||||||||||
| ||||||||||||||||||||
throwUserError :: CaughtMonadIO m => String -> m () | ||||||||||||||||||||
runSingleTest :: CaughtMonadIO m => m () -> m TestResult | ||||||||||||||||||||
Produced by Haddock version 0.7 |