test -package:sbv
Perform the "./setup test" action.
Lift a test in to a property.
Because both
TestT and
PropertyT have
MonadTest
instances, this function is not often required. It can however be
useful for writing functions directly in
TestT and thus gaining
a
MonadTransControl instance at the expense of not being able
to generate additional inputs using
forAll.
An example where this is useful is parallel state machine testing, as
executeParallel requires
MonadBaseControl IO in
order to be able to spawn threads in
MonadTest.
Define a test, with the given name and implementation.
Returns false if the pattern and the text do not match at all. Returns
true otherwise.
>>> test "brd" "bread"
True
Test with default options (
defOptions). Returns a list of
counterexamples
Check whether a communication has completed, and free the
communication request if so (
MPI_Test).
Check whether a communication has finished, and return the
communication result if so.
Apply one or the other validator depending on the result of a test.
Example
>>> let exV = test pass (fail "I'm a failure") (pure . (>3))
>>> validateP exV 3
Left (Valid 3)
>>> validateP exV 4
Right "I'm a failure"
Test if a variable is true (specialised to
Bool)
The basic structure used to create an annotated tree of test cases.
A single test of some particular type
This is the entry point into testing a built package. It performs the
"./setup test" action. It runs test suites designated in the
package description and reports on the results.