Haskell Hierarchical Libraries (HUnit package)ContentsIndex
Test.HUnit.Base
Synopsis
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
assert :: t -> Assertion
class ListAssertable t where
listAssert :: [t] -> Assertion
type AssertionPredicate = IO Bool
class AssertionPredicable t where
assertionPredicate :: t -> AssertionPredicate
(@?) :: AssertionPredicable t => t -> String -> Assertion
(@=?) :: (Eq a, Show a) => a -> a -> Assertion
(@?=) :: (Eq a, Show a) => a -> a -> Assertion
data Test
= TestCase Assertion
| TestList [Test]
| TestLabel String Test
data Node
= ListItem Int
| Label String
type Path = [Node]
testCaseCount :: Test -> Int
class Testable t where
test :: t -> Test
(~?) :: 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 = Counts {
cases, tried, errors, failures :: Int
}
data State = State {
path :: Path
counts :: Counts
}
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.6