BurntSushi / quickcheck

Automated property based testing for Rust (with shrinking).
The Unlicense
2.4k stars 149 forks source link

Take type bounds into account in integer Arbitrary #185

Closed tokenrove closed 6 years ago

tokenrove commented 6 years ago

Previously, certain generator sizes would wrap, calling gen_range with invalid ranges, causing assertion errors.

This is a little tricky because isize::min_value().abs() overflows.

Fixes #143.