Test: Use NearZeros to make simple Equal() tests#6458
Merged
jannotti merged 2 commits intoalgorand:masterfrom Oct 6, 2025
Merged
Test: Use NearZeros to make simple Equal() tests#6458jannotti merged 2 commits intoalgorand:masterfrom
jannotti merged 2 commits intoalgorand:masterfrom
Conversation
NeasrZeros had to be improved to avoid looping on recursive types. But it's now easy to write easy Equal() tests that will fail if you add a field to a type and forget to modify Equal(). Caught a bug in EvalDelta.Equal().
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6458 +/- ##
==========================================
- Coverage 50.90% 50.73% -0.17%
==========================================
Files 665 658 -7
Lines 111546 111459 -87
==========================================
- Hits 56780 56554 -226
- Misses 51899 52034 +135
- Partials 2867 2871 +4 ☔ View full report in Codecov by Sentry. |
cce
reviewed
Oct 6, 2025
cce
previously approved these changes
Oct 6, 2025
Contributor
cce
left a comment
There was a problem hiding this comment.
there is also
- verify.GroupContext
- crypto.MultisigSig
and that's it for Equal AFAIK
cce
approved these changes
Oct 6, 2025
gmalouf
approved these changes
Oct 6, 2025
cce
added a commit
to cce/go-algorand
that referenced
this pull request
Oct 7, 2025
…)" This reverts commit d1da52e.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NearZeros had to be improved to avoid looping on recursive types. But it's now easy to write easy Equal() tests that will fail if you add a field to a type and forget to modify Equal(). Caught a bug in EvalDelta.Equal().
Summary
Test Plan