Convenience for creating tests from an IO action
Moduletest-framework-0.8.2.3Haskell2010
Test.Framework.Providers.API
This module exports everything that you need to be able to create your own framework test provider. To create a provider you need to:
Create an instance of the Testlike class
Create an instance of the TestResultlike class
Expose a function that lets people construct Test values using your new instances
- 7 types
- 2 classes
- 25 values
- Packagetest-framework-0.8.2.3
- Exports34
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceAPI.hs
Convenience for creating tests from an IO action, with a cleanup handler for when tests are finished
Mark all tests in this portion of the tree as mutually exclusive, so only one runs at a time
Add some options to child tests
Assemble a number of tests into a cohesive group
Instances1Testlike
Testlike i r t => Testlike i r (MutuallyExcluded t)Defined in test-framework-0.8.2.3 · Test.Framework.Core
Main test data type: builds up a list of tests to be run. Users should use the utility functions in e.g. the test-framework-hunit and test-framework-quickcheck2 packages to create instances of Test, and then build them up into testsuites by using testGroup and lists.
For an example of how to use test-framework, please see http://github.com/batterseapower/test-framework/raw/master/example/Test/Framework/Example.lhs
Constructors
forall i r t. (Testlike i r t, Typeable t) => Test TestName tA single test of some particular type
TestGroup TestName [Test]Assemble a number of tests into a cohesive group
PlusTestOptions TestOptions TestAdd some options to child tests
BuildTestBracketed (IO (Test, IO ()))Convenience for creating tests from an IO action, with cleanup
Test names or descriptions. These are shown to the user
Something like the result of a test: works in concert with Testlike. The type parameters are the type that is used for progress reports and the type of the final output of the test respectively.
Methods
testSucceeded :: r -> Bool
The name of a type of test, such as Properties or "Test Cases". Tests of
types of the same names will be grouped together in the test run summary.
Something test-like in its behaviour. The type parameters are the type that is used for progress reports, the type of the final output of the test and the data type encapsulating the whole potential to do a test respectively.
Methods
runTest :: CompleteTestOptions -> t -> IO (i :~> r, IO ())testTypeName :: t -> TestTypeName
Instances1Testlike
Testlike i r t => Testlike i r (MutuallyExcluded t)Defined in test-framework-0.8.2.3 · Test.Framework.Core
As timeoutImprovingIO, but don't bother applying a timeout to the action if Nothing is given
as the number of microseconds to apply the time out for.
Given a number of microseconds and an improving IO action, run that improving IO action only for at most the given period before giving up. See also timeout.
Instances3Monad, Functor, Applicative
Monad (ImprovingIO i f)Defined in test-framework-0.8.2.3 · Test.Framework.ImprovingFunctor (ImprovingIO i f)Defined in test-framework-0.8.2.3 · Test.Framework.ImprovingApplicative (ImprovingIO i f)Defined in test-framework-0.8.2.3 · Test.Framework.Improving
module Test.Framework.Options
module Test.Framework.Seed