Skip to content

Commit c70022c

Browse files
Chandra Pratapgitster
authored andcommitted
t-reftable-tree: add test for non-existent key
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]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent abf1a96 commit c70022c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

t/unit-tests/t-reftable-tree.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ static void t_tree_search(void)
4747
check_pointer_eq(nodes[i], tree_search(&values[i], &root, &t_compare, 0));
4848
}
4949

50+
check(!tree_search(values, &root, t_compare, 0));
5051
tree_free(root);
5152
}
5253

0 commit comments

Comments
 (0)