diff options
Diffstat (limited to 'ethutil/trie_test.go')
-rw-r--r-- | ethutil/trie_test.go | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/ethutil/trie_test.go b/ethutil/trie_test.go index c89f2fbb7..2937b1525 100644 --- a/ethutil/trie_test.go +++ b/ethutil/trie_test.go @@ -173,12 +173,21 @@ func TestTriePurge(t *testing.T) { func TestTrieIt(t *testing.T) { _, trie := New() - trie.Update("c", LONG_WORD) - trie.Update("ca", LONG_WORD) - trie.Update("cat", LONG_WORD) - it := trie.NewIterator() - it.Each(func(key string, node *Value) { - fmt.Println(key, ":", node.Str()) - }) + data := [][]string{ + {"do", "verb"}, + {"ether", "wookiedoo"}, + {"horse", "stallion"}, + {"shaman", "horse"}, + {"doge", "coin"}, + {"ether", ""}, + {"dog", "puppy"}, + {"shaman", ""}, + } + + for _, item := range data { + trie.Update(item[0], item[1]) + } + + fmt.Printf("root %x", trie.Root) } |