A class supporting filtered operations.
Put a label on the generator to make test reports clearer
Put a label on the generator to make test reports clearer
Returns a new property that holds if and only if both this and the given generator generates the same result, or both generators generate no result.
Evaluate this generator with the given parameters
Create a new generator that uses this generator to produce a value that fulfills the given condition.
Create a new generator that uses this generator to produce a value that fulfills the given condition. If the condition is not fulfilled, the generator fails (returns None). Also, make sure that the provided test property is side-effect free, e.g. it should not use external vars.
Create a new generator that uses this generator to produce a value that doesn't fulfill the given condition.
Create a new generator that uses this generator to produce a value that doesn't fulfill the given condition. If the condition is fulfilled, the generator fails (returns None). Also, make sure that the provided test property is side-effect free, e.g. it should not use external vars.
Create a new generator by flat-mapping the result of this generator
Put a label on the generator to make test reports clearer
Create a new generator by mapping the result of this generator
Evaluate this generator with the given parameters.
Evaluate this generator with the given parameters.
The generator will attempt to generate a valid T
value. If a
valid value is not produced it may retry several times,
determined by the retries
parameter (which defaults to 100).
If all the retries fail it will throw a Gen.RetrievalError
exception.
Create a generator that calls this generator repeatedly until the given condition is fulfilled.
Create a generator that calls this generator repeatedly until the given condition is fulfilled. The generated value is then returned. Make sure that the provided test property is side-effect free (it should not use external vars).
If the generator fails more than 10000 times, a
RetryUntilException will be thrown. You can call retryUntil
with a second parameter to change this number.
Create a generator that calls this generator repeatedly until the given condition is fulfilled.
Create a generator that calls this generator repeatedly until the given condition is fulfilled. The generated value is then returned. Make sure that the provided test property is side-effect free (it should not use external vars).
If the generator fails more than maxTries, a RetryUntilException will be thrown.
Create a new generator that uses this generator to produce a value that fulfills the given condition.
Create a new generator that uses this generator to produce a value that fulfills the given condition. If the condition is not fulfilled, the generator fails (returns None). Also, make sure that the provided test property is side-effect free, e.g. it should not use external vars. This method is identical to [Gen.filter].
Creates a non-strict filtered version of this generator.
Perform some RNG perturbation before generating
Put a label on the generator to make test reports clearer
Put a label on the generator to make test reports clearer