Skip to content

Commit

Permalink
store: add test cases for hashing of empty inputs (#7004)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgrinaker authored Aug 11, 2020
1 parent 0f44d1a commit 7a0d5ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions store/internal/maps/maps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func TestMerkleMap(t *testing.T) {
values []string // each string gets converted to []byte in test
want string
}{
{[]string{}, []string{}, ""},
{[]string{"key1"}, []string{"value1"}, "a44d3cc7daba1a4600b00a2434b30f8b970652169810d6dfa9fb1793a2189324"},
{[]string{"key1"}, []string{"value2"}, "0638e99b3445caec9d95c05e1a3fc1487b4ddec6a952ff337080360b0dcc078c"},
// swap order with 2 keys
Expand Down Expand Up @@ -64,6 +65,7 @@ func TestSimpleMap(t *testing.T) {
values []string // each string gets converted to []byte in test
want string
}{
{[]string{}, []string{}, ""},
{[]string{"key1"}, []string{"value1"}, "a44d3cc7daba1a4600b00a2434b30f8b970652169810d6dfa9fb1793a2189324"},
{[]string{"key1"}, []string{"value2"}, "0638e99b3445caec9d95c05e1a3fc1487b4ddec6a952ff337080360b0dcc078c"},
// swap order with 2 keys
Expand Down

0 comments on commit 7a0d5ff

Please sign in to comment.