]> git.ipfire.org Git - thirdparty/git.git/commit
t/unit-tests: implement clar specific oid helper functions
authorSeyi Kuforiji <kuforiji98@gmail.com>
Tue, 25 Feb 2025 10:10:41 +0000 (11:10 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 25 Feb 2025 18:31:22 +0000 (10:31 -0800)
commita16a2ee312b088ae6ac2ab3302ed191d19a71718
tree0cae0f8a428a8e8e25dfa187d6cfbcbb65dced10
parent2d2a71ce85026edcc40f469678a1035df0dfcf57
t/unit-tests: implement clar specific oid helper functions

`get_oid_arbitrary_hex()` and `init_hash_algo()` are both required for
oid-related tests to run without errors. In the current implementation,
both functions are defined and declared in the
`t/unit-tests/lib-oid.{c,h}` which is utilized by oid-related tests in
the homegrown unit tests structure.

Adapt functions in lib-oid.{c,h} to use clar. Both these functions
become available for oid-related test files implemented using the clar
testing framework, which requires them. This will be used by subsequent
commits.

Mentored-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Seyi Kuforiji <kuforiji98@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
t/meson.build
t/unit-tests/lib-oid.c
t/unit-tests/lib-oid.h
t/unit-tests/unit-test.c