diff options
Diffstat (limited to 'tests/trie.c')
-rw-r--r-- | tests/trie.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/trie.c b/tests/trie.c index 9e9a294..59bde40 100644 --- a/tests/trie.c +++ b/tests/trie.c @@ -20,9 +20,11 @@ static const char *keys[] = { "quuuux", "pre", - "pref", "prefi", + "pref", "prefix", + "p", + "pRefix", "AAAA", "AADD", @@ -37,6 +39,10 @@ static const char *keys[] = { ">>>>>>", ">>><<<", ">>>", + + "AAAAAAA", + "AAAAAAAB", + "AAAAAAAa", }; static const size_t nkeys = countof(keys); @@ -75,6 +81,7 @@ void check_trie(void) { size_t i = 0; for_trie (leaf, &trie) { bfs_check(leaf == trie_find_str(&trie, keys[i])); + bfs_check(leaf == trie_insert_str(&trie, keys[i])); bfs_check(!leaf->prev || leaf->prev->next == leaf); bfs_check(!leaf->next || leaf->next->prev == leaf); ++i; |