Skip to content

Commit

Permalink
Update key_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
dboehm-avalabs committed Oct 17, 2023
1 parent b06be10 commit c9c562f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/merkledb/key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ func Test_Key_Take(t *testing.T) {
require := require.New(t)

for _, bf := range branchFactors {
// take more tokens than the key has
require.Equal(ToKey([]byte{0}, bf).Take(1000), ToKey([]byte{0}, bf))

// take no tokens
require.Equal(ToKey([]byte{0}, bf).Take(0), emptyKey(bf))
if bf == BranchFactor256 {
continue
Expand Down

0 comments on commit c9c562f

Please sign in to comment.