Closed glebpom closed 8 months ago
That's a great catch! I will get a fix out for this shortly, along with a test showing the fix.
For posterity: the bug only applies to Forced
driver mode, which is used in the random engine. The Direct
mode is still correct:
Also there's a special case for either mode that pulls bytes directly from the rng if the range is unbounded:
This also affects
one_of
, which never generates the last variant.I think the bug is in this line:
https://github.com/camshaft/bolero/blob/ed2f9f5d49b277e14737aeef6c07af00118c43c3/lib/bolero-generator/src/uniform.rs#L96
should be replaced with