HUnit-1.3.1.1: A unit testing framework for Haskell

Safe HaskellSafe
LanguageHaskell98

Test.HUnit.Lang

Contents

Synopsis

Documentation

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

assertFailure #

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

data Location #

Instances
Eq Location # 
Instance details

Defined in Test.HUnit.Lang

Ord Location # 
Instance details

Defined in Test.HUnit.Lang

Show Location # 
Instance details

Defined in Test.HUnit.Lang

data Result #

Instances
Eq Result # 
Instance details

Defined in Test.HUnit.Lang

Methods

(==) :: Result -> Result -> Bool #

(/=) :: Result -> Result -> Bool #

Ord Result # 
Instance details

Defined in Test.HUnit.Lang

Show Result # 
Instance details

Defined in Test.HUnit.Lang

performTestCase #

Arguments

:: Assertion

an assertion to be made during the test case run

-> IO Result 

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!