Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
impl: make sure a float's shrinker does not yield the original value
For floating point values, we use a shrinker for signed integers and convert the output to the float's type. The underlying shrinker is bounded and never includes the original value in the output, i.e. it behaves correctly. However, when converting the value to the target type we may loose some information and thus yield the original value, again. If the test happens to fail for such a value, we may end up endlessly repeating the test with a sequence of values including the original one over and over again. This change avoids the issue by applying an additional filter.
- Loading branch information