HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

ModuleHUnit-1.6.2.0Haskell2010

Test.HUnit.Lang

  • 4 types
  • 4 values
  • PackageHUnit-1.6.2.0
  • Exports8
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceLang.hs
typetype Assertion = IO ()
#

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.

valueassertEqual
  1. :: (HasCallStack, Eq a, Show a)
  2. => String

    The message prefix

  3. -> a

    The expected value

  4. -> a

    The actual value

  5. -> Assertion
#

Asserts 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.

Internals

3 declarations

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!