| Safe Haskell | Safe |
|---|---|
| Language | Haskell98 |
Test.HUnit.Lang
Contents
- type Assertion = IO ()
- assertFailure :: (?loc :: CallStack) => String -> Assertion
- data Location = Location {}
- data Result
- performTestCase :: Assertion -> IO Result
- data HUnitFailure = HUnitFailure (Maybe Location) String
Documentation
type Assertion = IO () Source #
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.
Arguments
| :: (?loc :: CallStack) | |
| => String | A message that is displayed with the assertion failure |
| -> Assertion |
Unconditionally signals that a failure has occured. All other assertions can be expressed with the form:
if conditionIsMet
then IO ()
else assertFailure msg
Constructors
| Location | |
Fields
| |
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!