Skip to content
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

feat(proptest): Implement proptest::Arbitrary for UnsignedInteger #526

Conversation

PatStiles
Copy link
Collaborator

Closes #414

Adds an implementation of proptest::Arbitrary for UnsignedInteger. Refactors proptests to use any::<UnsignedInteger>()

@PatStiles PatStiles requested review from schouhy, ajgara and a team as code owners August 15, 2023 19:49
@PatStiles
Copy link
Collaborator Author

Open to any feedback! Always looking to improve.

@codecov-commenter
Copy link

codecov-commenter commented Aug 15, 2023

Codecov Report

Merging #526 (b499787) into main (6ad2e46) will decrease coverage by 0.33%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #526      +/-   ##
==========================================
- Coverage   94.49%   94.16%   -0.33%     
==========================================
  Files          62       62              
  Lines        8987     8857     -130     
==========================================
- Hits         8492     8340     -152     
- Misses        495      517      +22     
Files Changed Coverage Δ
math/src/unsigned_integer/element.rs 97.17% <ø> (-1.08%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@Oppen Oppen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for the hard dep on proptest.

math/Cargo.toml Outdated
@@ -11,6 +11,7 @@ license.workspace = true
thiserror = { version = "1.0", optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }
serde_json = { version = "1.0", optional = true }
proptest = "1.1.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, make this dependency optional and use a feature flag. We don't want to force the dependency for users who aren't interested in testing with arbitrary numbers.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MauroToscano MauroToscano added this pull request to the merge queue Aug 31, 2023
Merged via the queue into lambdaclass:main with commit 33b823a Aug 31, 2023
6 of 7 checks passed
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 this pull request may close these issues.

Add proptest::Arbitrary support
6 participants