Re:Property-Based Testing in Rust with Arbitrary
by pfdietz on Friday November 11, 2022 @06:50AM
(#33559585)
One also may bias values to be similar (or equal) to other recently generated values. This was a trick used in the compiler tester yarpgen, where it was useful in testing optimization of bitwise operators on integers.
https://github.com/intel/yarpgen
https://github.com/intel/yarpgen/blob/main/papers/yarpgen-oo...
(see "Policies for constants", page 196:8.)
E.g. if you had "max_speed_kph: Option<u64>", your tests might never check what happens if max_speed_kph is 0.