Safe Haskell | Safe |
---|---|
Language | Haskell98 |
- type Assertion = IO ()
- assertFailure :: (?loc :: CallStack) => String -> Assertion
- data Location = Location {}
- data Result
- performTestCase :: Assertion -> IO Result
- data HUnitFailure = HUnitFailure (Maybe Location) String
Documentation
When an assertion is evaluated, it will output a message if and only if the assertion fails.
Test cases are composed of a sequence of one or more assertions.
Unconditionally signals that a failure has occured. All other assertions can be expressed with the form:
if conditionIsMet then IO () else assertFailure msg
Location | |
|
Performs a single test case.
Internals
Note: This is not part of the public API! It is exposed so that you can tinker with the internals of HUnit, but do not expect it to be stable!