git/t/unit-tests
Ghanshyam Thakkar ed54840872 t/: migrate helper/test-oidtree.c to unit-tests/t-oidtree.c
helper/test-oidtree.c along with t0069-oidtree.sh test the oidtree.h
library, which is a wrapper around crit-bit tree. Migrate them to
the unit testing framework for better debugging and runtime
performance. Along with the migration, add an extra check for
oidtree_each() test, which showcases how multiple expected matches can
be given to check_each() helper.

To achieve this, introduce a new library called 'lib-oid.h'
exclusively for the unit tests to use. It currently mainly includes
utility to generate object_id from an arbitrary hex string
(i.e. '12a' -> '12a0000000000000000000000000000000000000'). This also
handles the hash algo selection based on GIT_TEST_DEFAULT_HASH.
This library will also be helpful when we port other unit tests such
as oid-array, oidset etc.

Helped-by: Junio C Hamano <gitster@pobox.com>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Ghanshyam Thakkar <shyamthakkar001@gmail.com>
[jc: small fixlets squashed in]
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-06-12 13:33:20 -07:00
..
.gitignore
lib-oid.c t/: migrate helper/test-oidtree.c to unit-tests/t-oidtree.c 2024-06-12 13:33:20 -07:00
lib-oid.h t/: migrate helper/test-oidtree.c to unit-tests/t-oidtree.c 2024-06-12 13:33:20 -07:00
t-ctype.c t-ctype: avoid duplicating class names 2024-03-03 09:47:33 -08:00
t-mem-pool.c
t-oidtree.c t/: migrate helper/test-oidtree.c to unit-tests/t-oidtree.c 2024-06-12 13:33:20 -07:00
t-prio-queue.c t-prio-queue: simplify using compound literals 2024-04-02 13:41:32 -07:00
t-strbuf.c
t-strcmp-offset.c t/: port helper/test-strcmp-offset.c to unit-tests/t-strcmp-offset.c 2024-05-20 13:39:49 -07:00
t-strvec.c strvec: add functions to replace and remove strings 2024-05-27 11:20:02 -07:00
t-trailer.c trailer unit tests: inspect iterator contents 2024-05-02 09:57:08 -07:00
test-lib.c strvec: add functions to replace and remove strings 2024-05-27 11:20:02 -07:00
test-lib.h strvec: add functions to replace and remove strings 2024-05-27 11:20:02 -07:00