diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-10-10 12:25:30 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-10-10 12:25:30 -0400 |
commit | 3b874f45472d6ca3741230875cec3aee5fd0608c (patch) | |
tree | 5caa6751b04319c4f0c85835c063f1ae7fea1074 /tests/trie.c | |
parent | 39ff273df97e51b1285358b9e6808b117ea8adb1 (diff) | |
download | bfs-3b874f45472d6ca3741230875cec3aee5fd0608c.tar.xz |
tests/trie: Improve code coverage
Diffstat (limited to 'tests/trie.c')
-rw-r--r-- | tests/trie.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/trie.c b/tests/trie.c index 9e9a294..6e6024a 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", @@ -75,6 +77,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; |