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

[RDY] improve compile time tests coverage #91

Merged
merged 29 commits into from
Oct 23, 2019

Conversation

jangko
Copy link
Contributor

@jangko jangko commented Oct 9, 2019

The goal of this PR is to have 100% coverage for all exported API to pass compile time test.
The compile time helpers implementation might be not efficient, but first make it run then make it run fast.
As a bonus, it also improve runtime coverage.
zero, negative numbers, hi and lo tests also added if possible.
Inputs are welcome.

  • uint bitops2
  • uint endians2
  • io
  • int addsub
  • int bitwise
  • int comparison
  • int muldiv
  • uint addsub
  • uint bitwise
  • uint comparison
  • uint exp
  • uint modular arithmetic
  • uint muldiv

This was referenced Oct 19, 2019
@jangko jangko force-pushed the compile_time_tests branch from 3c2c8e5 to 4bd3183 Compare October 22, 2019 12:51
@jangko
Copy link
Contributor Author

jangko commented Oct 23, 2019

this PR is ready for review.
Summary:

  • there are no new features except truncate now able to truncate to full range of native ints.
  • all exported API are covered by compile time test. fixed Improve compile time test coverage #89 and probably Improve test coverage #67.
  • fixed various bugs encountered.
  • implement missing compile time functionalities.
  • pass all tests with Nim 0.19.6 and 1.0.2. while Nim 0.20.0 and 1.0.0 posses critical compile time bugs.

@jangko jangko changed the title [WIP] improve compile time tests coverage [RDY] improve compile time tests coverage Oct 23, 2019
Copy link
Contributor

@mratsim mratsim left a comment

Choose a reason for hiding this comment

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

Looks Great to me :)

@zah zah merged commit 8cc9116 into status-im:master Oct 23, 2019
@arnetheduck
Copy link
Member

@kdeme this looks like an interesting fuzzing target, wouldn't you say?

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.

4 participants