| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Test.Falsify.Context
Contents
Description
Context
Intended for qualified import.
import Test.Falsify import Test.Falsify.Context (Context) import qualified Test.Falsify.Context as Context
Context
Contextual data for a single test case
Properties can access contextual data pertaining to the current test case in a test run. An example of its use is varying the range of generated values depending on how many tests we have already done, generating a smaller range in the beginning but widening the range later on.
Instances
Static context
The part of the context that does not change between test iterations.
Constructors
| Static | |
Iteration context
Information about the current test iteration specifically.
Test execution context
NOTE: This should not affect whether the test passes or fails; if it does, you will get undefined shrinking behaviour.
Constructors
| Initial | Initial test execution |
| Shrinking Word | Shrink step We record the index of the shrink step (0-based) |
| Final Word | Final test execution We always end a test execution with one more final run, which is a repeat of the run that came just before it. We record how many shrink steps we took in between |