| Haskell Hierarchical Libraries (HUnit package) | Source code | Contents | Index

Test.HUnit.Base

Documentation
type Assertion = IO ()
assertFailure :: String -> Assertion
assertString :: String -> Assertion
assertBool :: String -> Bool -> Assertion
assertEqual :: (Eq a, Show a) => String -> a -> a -> Assertion
class Assertable t where

Methods

assert :: t -> Assertion

Instances

Assertable Bool
Assertable ()
Assertable t => Assertable (IO t)
ListAssertable t => Assertable [t]

class ListAssertable t where

Methods

listAssert :: [t] -> Assertion

Instances

ListAssertable Char

type AssertionPredicate = IO Bool
class AssertionPredicable t where

Methods

assertionPredicate :: t -> AssertionPredicate

Instances

AssertionPredicable Bool
AssertionPredicable t => AssertionPredicable (IO t)

(@?) :: AssertionPredicable t => t -> String -> Assertion
(@=?) :: (Eq a, Show a) => a -> a -> Assertion
(@?=) :: (Eq a, Show a) => a -> a -> Assertion
data Test

Constructors

TestCase Assertion |
TestList [Test] |
TestLabel String Test |

Instances

Show Test
Testable Test

data Node

Constructors

ListItem Int |
Label String |

Instances

Eq Node
Read Node
Show Node

type Path = [Node]
testCaseCount :: Test -> Int
class Testable t where

Methods

test :: t -> Test

Instances

Testable Test
Assertable t => Testable (IO t)
Testable t => Testable [t]

(~?) :: AssertionPredicable t => t -> String -> Test
(~=?) :: (Eq a, Show a) => a -> a -> Test
(~?=) :: (Eq a, Show a) => a -> a -> Test
(~:) :: Testable t => String -> t -> Test
data Counts

Constructors

Counts |

cases, tried, errors, failures :: Int |

Instances

Eq Counts
Read Counts
Show Counts

data State

Constructors

State |

path :: Path |
counts :: Counts |

Instances

Eq State
Read State
Show State

type ReportStart us = State -> us -> IO us
type ReportProblem us = String -> State -> us -> IO us
testCasePaths :: Test -> [Path]
performTest :: ReportStart us -> ReportProblem us -> ReportProblem us -> us -> Test -> IO (Counts, us)
Produced by Haddock version 0.8