diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2021-09-21 22:29:46 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2021-09-21 22:29:46 +0200 |
commit | d3a71850e2731613db64ff3c5ab72f2cc921ffd2 (patch) | |
tree | c4c7033dd25f12ebc302154296bddcf727ca5196 /tests/tree.c | |
parent | 8360724ed8591c995aafc43095b286ba2ee1d025 (diff) | |
download | dns-d3a71850e2731613db64ff3c5ab72f2cc921ffd2.tar.gz |
tests: tree, dns increase coverage
Diffstat (limited to 'tests/tree.c')
-rw-r--r-- | tests/tree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/tree.c b/tests/tree.c index ccfb3fe..20f5ee2 100644 --- a/tests/tree.c +++ b/tests/tree.c @@ -39,6 +39,9 @@ START_TEST(tree_basic) { ck_assert_int_eq(tree_balanced_insert( &root, (void**)data, keys, len ),0); + /* Check double insertion protection */ + ck_assert_int_ne( tree_insert( &root, keys[0], (void*)data[0] ), 0 ); + for ( i = 0; i < len; i++ ) { ck_assert_str_eq( tree_get(&root, keys[i]), data[i] ); } |