Skip to content

Commit

Permalink
t-reftable-tree: add test for non-existent key
Browse files Browse the repository at this point in the history
In the current testing setup for tree_search(), the case for
non-existent key is not exercised. Improve this by adding a
test-case for the same.

Mentored-by: Patrick Steinhardt <[email protected]>
Mentored-by: Christian Couder <[email protected]>
Signed-off-by: Chandra Pratap <[email protected]>
  • Loading branch information
Chandra Pratap committed Jul 18, 2024
1 parent 59d5c17 commit c1ce799
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions t/unit-tests/t-reftable-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ static void t_tree_search(void)
check_pointer_eq(nodes[i], tree_search(&values[i], &root, &t_compare, 0));
}

check(!tree_search(values, &root, t_compare, 0));
tree_free(root);
}

Expand Down

0 comments on commit c1ce799

Please sign in to comment.