diff options
| author | Seyi Kuforiji <kuforiji98@gmail.com> | 2025-02-25 11:10:44 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-02-25 10:31:23 -0800 |
| commit | 149585079facfbdb5713bb8852caea2068cd4f28 (patch) | |
| tree | d196c139c2df4c541d51f5246e140de74916151d /t/meson.build | |
| parent | 69bc044def16e8d8f85cd321b00ae53abe96a567 (diff) | |
| download | git-149585079facfbdb5713bb8852caea2068cd4f28.tar.xz | |
t/unit-tests: convert oidtree test to use clar test framework
Adapt oidtree 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_oidtree__initialize` handles the to set up of the global
oidtree variable and `test_oidtree__cleanup` frees the oidtree when all
tests are completed.
With this change, `check_each` 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 't/meson.build')
| -rw-r--r-- | t/meson.build | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/meson.build b/t/meson.build index d5b83cdb72..91699917ff 100644 --- a/t/meson.build +++ b/t/meson.build @@ -6,6 +6,7 @@ clar_test_suites = [ 'unit-tests/u-mem-pool.c', 'unit-tests/u-oid-array.c', 'unit-tests/u-oidmap.c', + 'unit-tests/u-oidtree.c', 'unit-tests/u-prio-queue.c', 'unit-tests/u-reftable-tree.c', 'unit-tests/u-strbuf.c', @@ -51,7 +52,6 @@ clar_unit_tests = executable('unit-tests', test('unit-tests', clar_unit_tests) unit_test_programs = [ - 'unit-tests/t-oidtree.c', 'unit-tests/t-reftable-basics.c', 'unit-tests/t-reftable-block.c', 'unit-tests/t-reftable-merged.c', |
