Test.Runner.Backends
Description
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
- TestRunnerTest :: RunnableTest a => a -> TestRunnerTest
- class RunnableTest a where
- data RunWithQuickCheck where
- RunWithQuickCheck :: Testable a => a -> RunWithQuickCheck
- runWithQuickCheck :: Testable a => a -> TestRunnerTest
Documentation
data TestRunnerTest whereSource
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.
Constructors
| TestRunnerTest :: RunnableTest a => a -> TestRunnerTest |
class RunnableTest a whereSource
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
fails, where s is a human-readable description of the failure.
Methods
run :: a -> IO (Maybe String)Source
runWithArgs :: Args -> a -> IO (Maybe String)Source
runWithArgs runs the test with specified QuickCheck arguments. For
all non-QuickCheck tests, this defaults to just run.
Instances
| RunnableTest Bool | Any expression that returns |
| RunnableTest Test | HUnit |
| RunnableTest RunWithQuickCheck | 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) | Any |
data RunWithQuickCheck whereSource
RunWithQuickCheck turns a QuickCheck test into something that can be run
with testrunner. This type-level indirection is necessary to please the
type checker.
Constructors
| RunWithQuickCheck :: Testable a => a -> RunWithQuickCheck |
Instances
| RunnableTest RunWithQuickCheck | 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. |
runWithQuickCheck :: Testable a => a -> TestRunnerTestSource
Convenience function to go from something testable by QuickCheck to a
TestRunnerTest in one step.