You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears this test will always pass even setting QUICKCHECK_TESTS and QUICKCHECK_MAX_TESTS to a large value (e.g., 10000000) and QUICKCHECK_GENERATOR_SIZE to 300,
fnprop_gt(x:i8) -> bool{
x != i8::min_value()}fnmain(){quickcheck(prop_gt asfn(i8) -> bool);println!("Hello, world!");}
This commit tweaks the Arbitrary impls of number types (integers,
floats) to use the full range with a small bias toward "problem" values.
This is a change from prior behavior that would use the `size` parameter
to control the range of integers.
In retrospect, using the `size` parameter this way was probably
misguided. Instead, it should only be used to control the sizes of data
structures instead of also constraining numeric ranges. By constraining
numeric ranges, we leave out a huge space of values that are never
tested.
Fixes#27, Fixes#119, Fixes#190, Fixes#233, Closes#240
Hello,
It appears this test will always pass even setting
QUICKCHECK_TESTS
andQUICKCHECK_MAX_TESTS
to a large value (e.g.,10000000
) andQUICKCHECK_GENERATOR_SIZE
to300
,It appears these lines of code attribute to this issue,
https://docs.rs/quickcheck/0.8.2/src/quickcheck/arbitrary.rs.html#756-771
If
upper = min(g.size(), $ty::max_value() as usize)
, thenif upper > $ty::max_value()
always evaluates to the else branch.The text was updated successfully, but these errors were encountered: