-
Notifications
You must be signed in to change notification settings - Fork 42
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: verifies the namespace order for each tree node #187
Conversation
Codecov Report
@@ Coverage Diff @@
## master #187 +/- ##
==========================================
+ Coverage 95.70% 95.73% +0.03%
==========================================
Files 5 5
Lines 559 563 +4
==========================================
+ Hits 535 539 +4
Misses 14 14
Partials 10 10
|
@@ -100,18 +100,6 @@ func Test_namespacedTreeHasher_HashNode(t *testing.T) { | |||
concat([]byte{0, 0, 0, 0}, randHash), | |||
concat([]byte{0, 0, 1, 1}, randHash))), | |||
}, | |||
// XXX: can this happen in practice? or is this an invalid state? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test case has become invalid as a result of the changes made in this PR, since the minimum ID of the left child i.e., {1,1}
is greater than its maximum NID i.e., {0,0}
.
} | ||
} | ||
|
||
func TestMin(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added these test as the codcov was complaining about the lack of coverage for some part of the min
function.
@@ -735,3 +769,73 @@ func Test_MustHashLeaf_Panic(t *testing.T) { | |||
}) | |||
} | |||
} | |||
|
|||
func TestMax(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added these tests for consistency with the tests developed for the min
counterpart.
Overview
Closes #129.
Checklist