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

test(p/uint25): Increase Test Coverage for uint256 Package #2931

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

notJoon
Copy link
Member

@notJoon notJoon commented Oct 10, 2024

Description

Screenshot 2024-10-10 at 2 53 28 PM

Increased the test coverage of the p/demo/uint256 package. Previously, only about 40% was covered, but now it has increased to 90% (checked in go).

The existing implementations of uint256 functions have not been modified.

related with: #2846

  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

@notJoon notJoon requested review from a team as code owners October 10, 2024 05:54
@notJoon notJoon requested review from jaekwon and petar-dambovaliev and removed request for a team October 10, 2024 05:54
@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Oct 10, 2024
Copy link

codecov bot commented Oct 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.95%. Comparing base (09b6241) to head (8dc404c).
Report is 14 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2931      +/-   ##
==========================================
+ Coverage   60.90%   60.95%   +0.05%     
==========================================
  Files         564      564              
  Lines       75273    75273              
==========================================
+ Hits        45846    45885      +39     
+ Misses      26055    26018      -37     
+ Partials     3372     3370       -2     
Flag Coverage Δ
contribs/gnodev 61.46% <ø> (ø)
contribs/gnofaucet 14.46% <ø> (ø)
gno.land 67.92% <ø> (+0.75%) ⬆️
gnovm 65.78% <ø> (+<0.01%) ⬆️
misc/genstd 80.54% <ø> (ø)
misc/logos 19.88% <ø> (ø)
tm2 61.99% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -142,7 +142,8 @@ func (z *Uint) fromDecimal(bs string) error {
for i, mult := range multipliers {
if remaining <= 0 {
return nil // Done
} else if remaining > 19 {
}
if remaining > 19 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this change requested by lint?

Copy link
Member Author

Choose a reason for hiding this comment

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

This was just my personal preference. should I revert?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think so. My guess is that core devs will approve the PR more quickly if it just updates the tests. It's up to you.

Copy link
Member Author

Choose a reason for hiding this comment

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

good. reverted just in case

@jefft0 jefft0 added the review team PRs that should be reviewed first by the review team or external contributors label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧾 package/realm Tag used for new Realms or Packages. review team PRs that should be reviewed first by the review team or external contributors
Projects
Status: No status
Status: In Review
Status: In Review
Development

Successfully merging this pull request may close these issues.

2 participants