Std.Test.Property.forAll
1 declaration
fn
forAll: Str -> UInt64 -> Int -> fn(Std.Random.Generator) -> (Std.Random.Generator, T) -> fn(T) -> Array[T] -> fn(T) -> Bool -> Std.Test.CheckThis is a callable function.
What it does
A check that a property holds for every generated value.
The seed is given rather than taken from a clock, so the check is a pure
function of it and a suite stays a value that can be run twice with the same
answer. A failure reports the seed alongside the counterexample, which is
what makes a random test something a reader can reproduce instead of
something they run again and hope about.
A counterexample is reduced before it is reported, and the report says how
many steps that took — a value shrunk from one that was found is worth more
than either alone, because it shows the property was tested at scale and
still fails at the smallest size.
Read the signature
- The text after the name is the type checked by Pudu.
- Read arrows from left to right: inputs come first, and the final type is returned.
- Names inside [ ] are type arguments, such as the item type held by a collection.
