t: migrate helper/test-oidmap.c to unit-tests/t-oidmap.c
commit28c1c077001d5cf715eb6264d75bc2537aa8cfd2
authorGhanshyam Thakkar <shyamthakkar001@gmail.com>
Wed, 3 Jul 2024 06:29:53 +0000 (3 11:59 +0530)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Jul 2024 16:12:14 +0000 (3 09:12 -0700)
tree58d5796cf67d2cd37e00028c7df2c6b6233d54ea
parent790a17fb19d6eadd16c52e5d284a5c6921744766
t: migrate helper/test-oidmap.c to unit-tests/t-oidmap.c

helper/test-oidmap.c along with t0016-oidmap.sh test the oidmap.h
library which is built on top of hashmap.h.

Migrate them to the unit testing framework for better performance,
concise code and better debugging. Along with the migration also plug
memory leaks and make the test logic independent for all the tests.
The migration removes 'put' tests from t0016, because it is used as
setup to all the other tests, so testing it separately does not yield
any benefit.

Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Reviewed-by: Josh Steadmon <steadmon@google.com>
Helped-by: Phillip Wood <phillip.wood123@gmail.com>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Ghanshyam Thakkar <shyamthakkar001@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
t/helper/test-oidmap.c [deleted file]
t/helper/test-tool.c
t/helper/test-tool.h
t/t0016-oidmap.sh [deleted file]
t/unit-tests/t-oidmap.c [new file with mode: 0644]