test package:hedgehog
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.
A test monad allows the assertion of expectations.
The number of successful tests that need to be run before a property
test is considered successful.
Can be constructed using numeric literals:
200 :: TestLimit
A test monad transformer allows the assertion of expectations.
The number of tests a property ran successfully.
The number of successful tests that need to be run before a property
test is considered successful.
Can be constructed using numeric literals:
200 :: TestLimit
A test monad transformer allows the assertion of expectations.
Set the number of times a property should be executed before it is
considered successful.
If you have a test that does not involve any generators and thus does
not need to run repeatedly, you can use withTests 1 to define
a property that will only be checked once.
Skip to a specific test number. If it fails, shrink as normal. If it
passes, move on to the next test. Coverage checks are disabled.
We also need to count discards, since failing "after 7 tests" points
at a different generated value than failing "after 7 tests and 5
discards".
The minimum amount of tests to run for a
Property