chore(trie): lib/trie/hash.go tests#2049
Conversation
03a0935 to
6673e86
Compare
91b3fe8 to
8274c87
Compare
Codecov Report
@@ Coverage Diff @@
## development #2049 +/- ##
===============================================
- Coverage 60.35% 60.15% -0.20%
===============================================
Files 200 194 -6
Lines 27013 26686 -327
===============================================
- Hits 16303 16053 -250
+ Misses 8801 8747 -54
+ Partials 1909 1886 -23
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
97a2391 to
330195b
Compare
8274c87 to
7c7b2c6
Compare
lib/trielib/trie/hash.go tests
Co-authored-by: noot <36753753+noot@users.noreply.github.com>
7c7b2c6 to
e7fbfe5
Compare
| func TestHashBranch(t *testing.T) { | ||
| n := &branch{key: generateRandBytes(380), value: generateRandBytes(380)} | ||
| n.children[3] = &leaf{key: generateRandBytes(380), value: generateRandBytes(380)} |
There was a problem hiding this comment.
should we add a test for random nodes as well?
There was a problem hiding this comment.
Why? 🤔
I'm a big fan of deterministic tests.
Unless we need crypto randomness in certain niche cases (i.e.generate uniform distribution etc.)?
noot
left a comment
There was a problem hiding this comment.
looks good to me! how do you feel about adding more tests using generateRand haha
|
🎉 This PR is included in version 0.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Changes
Tests
Issues
Primary Reviewer