tkaitchuck/constrandom

Document the test suite with probability of failure

Closed this issue · 1 comments

It looks like the tests in tests.rs are intentionally flaky. Any of the three below assertions could fail nondeterministically. Usually this is frowned upon. In this case the probabilities are so low that it's unlikely to ever be observed, but it would be helpful to acknowledge this with a comment that documents the probability of failure.

const value1: u32 = const_random!(u32);
const value2: u32 = const_random!(u32);
assert_ne!(0, value1);
assert_ne!(0, value2);
assert_ne!(value1, value2);