ShrinkMode
Rasuvaeff\PropertyTesting\Runner\ShrinkMode
Enum — Package: property-testing-core — Source — Version: v1.0.0-1-g88fdee2
Implements: UnitEnum
How hard the runner works to minimise a counterexample.
Runner\PropertyConfig::$maxShrinks caps the accepted steps; the cost of a descent is in the candidates it tries, which on large collections easily exceeds the random phase that found the failure. These modes bound that cost from the other side.
The mode is derived, never set twice: a phase set without Runner\Phase::Shrink is Runner\ShrinkMode::Off, and a configured Runner\PropertyConfig::$shrinkBudgetMs is Runner\ShrinkMode::Bounded.
Constants
| Constant | Type | Value | Description |
|---|---|---|---|
Off | Runner\ShrinkMode | No descent at all: the counterexample is reported exactly as generated, with zero shrink steps and zero shrink trials. | |
Bounded | Runner\ShrinkMode | The descent runs until its wall-clock budget expires, then returns the best candidate found so far. Deliberately not reproducible across machines — see PropertyConfig::$shrinkBudgetMs. | |
Full | Runner\ShrinkMode | The descent runs to exhaustion, subject only to PropertyConfig::$maxShrinks. The default, and the only deterministic mode. |
Cases
| Case | Backing value |
|---|---|
Off | — |
Bounded | — |
Full | — |