-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A unit testing framework for Haskell -- -- HUnit is a unit testing framework for Haskell, inspired by the JUnit -- tool for Java, see: http://www.junit.org. @package HUnit @version 1.1 module Test.HUnit.Terminal terminalAppearance :: String -> String module Test.HUnit.Lang type Assertion = IO () assertFailure :: String -> Assertion performTestCase :: Assertion -> IO (Maybe (Bool, String)) module Test.HUnit.Base 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 assert :: (Assertable t) => t -> Assertion class ListAssertable t listAssert :: (ListAssertable t) => [t] -> Assertion type AssertionPredicate = IO Bool class AssertionPredicable t assertionPredicate :: (AssertionPredicable t) => 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 -> Test TestList :: [Test] -> Test TestLabel :: String -> Test -> Test data Node ListItem :: Int -> Node Label :: String -> Node type Path = [Node] testCaseCount :: Test -> Int class Testable t test :: (Testable t) => 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 :: Int -> Int -> Int -> Int -> Counts cases :: Counts -> Int tried :: Counts -> Int errors :: Counts -> Int failures :: Counts -> Int data State State :: Path -> Counts -> State path :: State -> Path counts :: State -> 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) instance Eq State instance Show State instance Read State instance Eq Counts instance Show Counts instance Read Counts instance Eq Node instance Show Node instance Read Node instance (Testable t) => Testable [t] instance (Assertable t) => Testable (IO t) instance Testable Test instance Show Test instance (AssertionPredicable t) => AssertionPredicable (IO t) instance AssertionPredicable Bool instance ListAssertable Char instance (Assertable t) => Assertable (IO t) instance (ListAssertable t) => Assertable [t] instance Assertable Bool instance Assertable () module Test.HUnit.Text data PutText st PutText :: (String -> Bool -> st -> IO st) -> st -> PutText st putTextToHandle :: Handle -> Bool -> PutText Int putTextToShowS :: PutText ShowS runTestText :: PutText st -> Test -> IO (Counts, st) showPath :: Path -> String showCounts :: Counts -> String runTestTT :: Test -> IO Counts module Test.HUnit