Skip to content

Quickcheck and test coverage #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
japaric opened this issue Aug 13, 2016 · 0 comments · Fixed by #36
Closed

Quickcheck and test coverage #31

japaric opened this issue Aug 13, 2016 · 0 comments · Fixed by #36

Comments

@japaric
Copy link
Member

japaric commented Aug 13, 2016

Quickcheck generates integer values in a small range around zero ([-100, 100]) (cf BurntSushi/quickcheck#119). These values are not enough to tests all the branches of some intrinsics implementation. We need better control over the generated values; here's are some possible solutions of the top of my head:

  • Synthesize integer values from two halves. That's is use (u32, u32) as quickcheck argument and then use u64::from_parts(some_u32, another_u32) in the actual test.
  • Create a newtype, e.g. U64(u64), and implement the Arbitrary trait for it, but have the implementation generate values in the [MIN, MAX] range.
japaric pushed a commit that referenced this issue Aug 13, 2016
tgross35 pushed a commit to tgross35/compiler-builtins that referenced this issue Feb 23, 2025
61: Implement `round` r=japaric a=notriddle

Fixes rust-lang#31 

Co-authored-by: Michael Howell <michael@notriddle.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant