testrunner-0.9: Easy unit test driver frameworkSource codeContentsIndex
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.
Synopsis
data TestRunnerTest where
TestRunnerTest :: RunnableTest a => a -> TestRunnerTest
class RunnableTest a where
run :: a -> IO (Maybe String)
runWithArgs :: Args -> a -> IO (Maybe String)
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.
show/hide Instances
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
show/hide Instances
runWithQuickCheck :: Testable a => a -> TestRunnerTestSource
Convenience function to go from something testable by QuickCheck to a TestRunnerTest in one step.
Produced by Haddock version 2.6.0