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

Assert no underflow/overflow happened with UInt64 in tests #128

Open
mkalinin opened this issue May 9, 2019 · 0 comments
Open

Assert no underflow/overflow happened with UInt64 in tests #128

mkalinin opened this issue May 9, 2019 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers tests

Comments

@mkalinin
Copy link
Contributor

mkalinin commented May 9, 2019

Background

There is a bunch of consensus types derived from UInt64 like SlotNumber, EpochNumber, ShardNumber, etc. Variables of these types could get underflowed or overflowed during various calculations. It would be nice to catch these cases all over the code in tests.

To Do

Implement a flag that would enable assertion that no underflows/overflows happens in UInt64 variables and its derivatives. Set this flag to false by default and enabled it only when JUnit tests takes the scene.

@mkalinin mkalinin added enhancement New feature or request good first issue Good for newcomers tests labels May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers tests
Projects
None yet
Development

No branches or pull requests

1 participant