| HUnit-1.2.0.3: A unit testing framework for Haskell | Source code | Contents | Index

Test.HUnit.Base

Documentation

type Assertion = IO () | Source

assertFailure :: String -> Assertion | Source

assertString :: String -> Assertion | Source

assertBool :: String -> Bool -> Assertion | Source

assertEqual :: (Eq a, Show a) => String -> a -> a -> Assertion | Source

class Assertable t where | Source

Methods

assert :: t -> Assertion | Source

Instances

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

class ListAssertable t where | Source

Methods

listAssert :: [t] -> Assertion | Source

Instances

ListAssertable Char

type AssertionPredicate = IO Bool | Source

class AssertionPredicable t where | Source

Methods

assertionPredicate :: t -> AssertionPredicate | Source

Instances

AssertionPredicable Bool
AssertionPredicable t => AssertionPredicable (IO t)

(@?) :: AssertionPredicable t => t -> String -> Assertion | Source

(@=?) :: (Eq a, Show a) => a -> a -> Assertion | Source

(@?=) :: (Eq a, Show a) => a -> a -> Assertion | Source

data Test | Source

Constructors

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

Instances

Show Test
Testable Test

data Node | Source

Constructors

ListItem Int |
Label String |

Instances

Eq Node
Read Node
Show Node

type Path = [Node] | Source

testCaseCount :: Test -> Int | Source

class Testable t where | Source

Methods

test :: t -> Test | Source

Instances

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

(~?) :: AssertionPredicable t => t -> String -> Test | Source

(~=?) :: (Eq a, Show a) => a -> a -> Test | Source

(~?=) :: (Eq a, Show a) => a -> a -> Test | Source

(~:) :: Testable t => String -> t -> Test | Source

data Counts | Source

Constructors

Counts |

cases :: Int |
tried :: Int |
errors :: Int |
failures :: Int |

Instances

Eq Counts
Read Counts
Show Counts

data State | Source

Constructors

State |

path :: Path |
counts :: Counts |

Instances

Eq State
Read State
Show State

type ReportStart us = State -> us -> IO us | Source

type ReportProblem us = String -> State -> us -> IO us | Source

testCasePaths :: Test -> [Path] | Source

performTest :: ReportStart us -> ReportProblem us -> ReportProblem us -> us -> Test -> IO (Counts, us) | Source

Produced by Haddock version 2.4.2