summaryrefslogtreecommitdiff
path: root/commit-graph.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-04-03 08:04:00 +0200
committerJunio C Hamano <gitster@pobox.com>2024-04-03 09:16:49 -0700
commite8b808258e70d85918aaee0c84817b74a747c9d5 (patch)
tree75f27d609ba6e2324029ff588c0276681339ae58 /commit-graph.c
parent3e7b36d129a5972e20cab4e55c43a8628b4d2c9c (diff)
reftable/basics: improve `binsearch()` test
The `binsearch()` test is somewhat weird in that it doesn't explicitly spell out its expectations. Instead it does so in a rather ad-hoc way with some hard-to-understand computations. Refactor the test to spell out the needle as well as expected index for all testcases. This refactoring highlights that the `binsearch_func()` is written somewhat weirdly to find the first integer smaller than the needle, not smaller or equal to it. Adjust the function accordingly. While at it, rename the callback function to better convey its meaning. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions