aboutsummaryrefslogtreecommitdiffstats
path: root/ptrie/iterator_test.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-08 18:47:04 +0800
committerobscuren <geffobscura@gmail.com>2015-01-08 18:47:04 +0800
commitdb4aaedcbdb409e17ea3de161e7b24a80ba0a58c (patch)
tree98a86ccc265ef05913b8e65a1ce2cae9c13ea788 /ptrie/iterator_test.go
parent982c812e81304cad835796d4fa3d67c8f08141b6 (diff)
downloaddexon-db4aaedcbdb409e17ea3de161e7b24a80ba0a58c.tar
dexon-db4aaedcbdb409e17ea3de161e7b24a80ba0a58c.tar.gz
dexon-db4aaedcbdb409e17ea3de161e7b24a80ba0a58c.tar.bz2
dexon-db4aaedcbdb409e17ea3de161e7b24a80ba0a58c.tar.lz
dexon-db4aaedcbdb409e17ea3de161e7b24a80ba0a58c.tar.xz
dexon-db4aaedcbdb409e17ea3de161e7b24a80ba0a58c.tar.zst
dexon-db4aaedcbdb409e17ea3de161e7b24a80ba0a58c.zip
Moved ptrie => trie. Removed old trie
Diffstat (limited to 'ptrie/iterator_test.go')
-rw-r--r--ptrie/iterator_test.go33
1 files changed, 0 insertions, 33 deletions
diff --git a/ptrie/iterator_test.go b/ptrie/iterator_test.go
deleted file mode 100644
index acfc03d63..000000000
--- a/ptrie/iterator_test.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package ptrie
-
-import "testing"
-
-func TestIterator(t *testing.T) {
- trie := NewEmpty()
- vals := []struct{ k, v string }{
- {"do", "verb"},
- {"ether", "wookiedoo"},
- {"horse", "stallion"},
- {"shaman", "horse"},
- {"doge", "coin"},
- {"dog", "puppy"},
- {"somethingveryoddindeedthis is", "myothernodedata"},
- }
- v := make(map[string]bool)
- for _, val := range vals {
- v[val.k] = false
- trie.UpdateString(val.k, val.v)
- }
- trie.Commit()
-
- it := trie.Iterator()
- for it.Next() {
- v[string(it.Key)] = true
- }
-
- for k, found := range v {
- if !found {
- t.Error("iterator didn't find", k)
- }
- }
-}