summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorChandra Pratap <chandrapratap3519@gmail.com>2024-08-04 19:36:49 +0530
committerJunio C Hamano <gitster@pobox.com>2024-08-04 09:50:27 -0700
commit3a498b49d1b7d1ffc939b87310533a40ecbd8c43 (patch)
tree97b7f4cdad3de1dbb9b48c4e7e058fb559a5ec93 /builtin/commit.c
parentc70022c1b9b3a6ea4d4d3f4b54edf0d759e520e3 (diff)
t-reftable-tree: improve the test for infix_walk()
In the current testing setup for infix_walk(), the following properties of an infix traversal of a tree remain untested: - every node of the tree must be visited - every node must be visited exactly once In fact, only the property 'traversal in increasing order' is tested. Modify test_infix_walk() to check for all the properties above. This can be achieved by storing the nodes' keys linearly, in a nullified buffer, as we visit them and then checking the input keys against this buffer in increasing order. By checking that the element just after the last input key is 'NULL' in the output buffer, we ensure that every node is traversed exactly once. 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 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions