Test.Runner.Backends contains the types and functions that make it possible to run tests constructed with different test packages with the same driver framework from Test.Runner.Driver.
- data TestRunnerTest where
- class RunnableTest a where
- data RunWithQuickCheck where
- runWithQuickCheck :: Testable a => a -> TestRunnerTest
A TestRunnerTest is a data type that hides the actual type of the test - QuickCheck, plain IO action, or any other RunnableTest. This is required to be able to put tests of different types in a single list.
The class of all types that testrunner can treat as a test. The method
run should return
Nothing if the test succeeds, or
Just s if the test
s is a human-readable description of the failure.
runWithArgs runs the test with specified QuickCheck arguments. For
all non-QuickCheck tests, this defaults to just
Any expression that returns
QuickCheck properties can be run by testrunner. You do lose a lot of information on the result though; only whether the test succeeded or not is returned.
|RunnableTest (IO Bool)|
RunWithQuickCheck turns a QuickCheck test into something that can be run
with testrunner. This type-level indirection is necessary to please the