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.
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27
ModuleHUnit-1.6.2.0Haskell2010
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.
assertFailure :: HasCallStack=> StringA message that is displayed with the assertion failure
-> IO aUnconditionally signals that a failure has occurred.
assertEqual :: (HasCallStack, Eq a, Show a)=> StringThe message prefix
-> aThe expected value
-> aThe actual value
-> AssertionAsserts that the specified actual value is equal to the expected value. The output message will contain the prefix, the expected value, and the actual value.
If the prefix is the empty string (i.e., ""), then the prefix is omitted
and only the expected and actual values are output.
Performs a single test case.
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!
Eq HUnitFailureDefined in HUnit-1.6.2.0 · Test.HUnit.LangShow HUnitFailureDefined in HUnit-1.6.2.0 · Test.HUnit.LangException HUnitFailureDefined in HUnit-1.6.2.0 · Test.HUnit.LangEq FailureReasonDefined in HUnit-1.6.2.0 · Test.HUnit.LangShow FailureReasonDefined in HUnit-1.6.2.0 · Test.HUnit.Lang