Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Reporting functionality for HUnit-Plus. Test reporting is now
defined using a set of events. A Reporter
contains handlers for
these events, which have access to and update a Reporter
-defined
state value. The handlers in a Reporter
are called at
appropriate points during text execution.
This module also contains a basic defaultReporter
that simply
passes the state value through unchanged. It also defines
combinedReporter
, which facilitates "gluing" two Reporter
s
together.
- data Node = Label String
- data State = State {}
- data Counts = Counts {}
- data Reporter us = Reporter {
- reporterStart :: IO us
- reporterEnd :: Double -> Counts -> us -> IO us
- reporterStartSuite :: State -> us -> IO us
- reporterEndSuite :: Double -> State -> us -> IO us
- reporterStartCase :: State -> us -> IO us
- reporterCaseProgress :: String -> State -> us -> IO us
- reporterEndCase :: Double -> State -> us -> IO us
- reporterSkipCase :: State -> us -> IO us
- reporterSystemOut :: String -> State -> us -> IO us
- reporterSystemErr :: String -> State -> us -> IO us
- reporterFailure :: String -> State -> us -> IO us
- reporterError :: String -> State -> us -> IO us
- type Path = [Node]
- zeroCounts :: Counts
- showPath :: Path -> String
- defaultReporter :: Reporter a
- combinedReporter :: Reporter us1 -> Reporter us2 -> Reporter (us1, us2)
Documentation
Keeps track of the remaining tests and the results of the performed tests. As each test is performed, the path is removed and the counts are updated as appropriate.
State | |
|
A record that holds the results of tests that have been performed up until this point.
Report generator. This record type contains a number of functions that are called at various points throughout a test run.
Reporter | |
|
Uniquely describes the location of a test within a test hierarchy. Node order is from test case to root.
A Counts
with all zero counts.
showPath :: Path -> String Source
Converts a test case path to a string, separating adjacent elements by
a dot ('.'). An element of the path is quoted (as with show
) when
there is potential ambiguity.
defaultReporter :: Reporter a Source
A reporter containing default actions, which are to do nothing and return the user state unmodified.