diff options
author | Seyi Kuforiji <kuforiji98@gmail.com> | 2025-02-25 11:10:43 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-02-25 10:31:22 -0800 |
commit | 69bc044def16e8d8f85cd321b00ae53abe96a567 (patch) | |
tree | f16ae6fc2eb2759406c26039ce56bcf1a270f1d5 /commit-graph.c | |
parent | 869a1edf4470fab379fdead671036d6906112da2 (diff) |
t/unit-tests: convert oidmap test to use clar test framework
Adapt oidmap test script to clar framework by using clar assertions
where necessary. `cl_parse_any_oid()` ensures the hash algorithm is set
before parsing. This prevents issues from an uninitialized or invalid
hash algorithm.
Introduce 'test_oidmap__initialize` handles the to set up of the global
oidmap map with predefined key-value pairs, and `test_oidmap__cleanup`
frees the oidmap and its entries when all tests are completed.
The test loops through all entries to detect multiple errors. With this
change, it stops at the first error encountered, making it easier to
address it.
Mentored-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Seyi Kuforiji <kuforiji98@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions