diff options
author | Chandra Pratap <chandrapratap3519@gmail.com> | 2024-08-04 16:06:48 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-04 18:50:27 +0200 |
commit | c70022c1b9b3a6ea4d4d3f4b54edf0d759e520e3 (patch) | |
tree | 101e95fa0506e7629b6eeed2d3afe06ce6eda3ba /t | |
parent | t-reftable-tree: split test_tree() into two sub-test functions (diff) | |
download | git-c70022c1b9b3a6ea4d4d3f4b54edf0d759e520e3.tar.xz git-c70022c1b9b3a6ea4d4d3f4b54edf0d759e520e3.zip |
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 <ps@pks.im>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Chandra Pratap <chandrapratap3519@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rw-r--r-- | t/unit-tests/t-reftable-tree.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/t/unit-tests/t-reftable-tree.c b/t/unit-tests/t-reftable-tree.c index 7cc52a1925..2220414a18 100644 --- a/t/unit-tests/t-reftable-tree.c +++ b/t/unit-tests/t-reftable-tree.c @@ -47,6 +47,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); } |