Re: [PATCH 0/6] unit-tests: add and use TEST_RUN to simplify tests
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 10, 2024, 22:13 UTC
- Message-ID
- <xmqqy168uc8i.fsf@gitster.g>
- In-Reply-To
- <85b6b8a9-ee5f-42ab-bcbc-49976b30ef33@web.de>
René Scharfe <l.s.r@web.de> writes:
Show 24 quoted lines
> The macro TEST only allows defining a test that consists of a single > expression. This requires wrapping tests made up of one or more > statements in a function, which is a small, but avoidable hurdle. This > series provides a new macro, TEST_RUN, that provides a way to define > tests without requiring to declare a function. > > t0080: move expected output to a file > unit-tests: add TEST_RUN > t-ctype: use TEST_RUN > t-reftable-basics: use TEST_RUN > t-strvec: use TEST_RUN > t-strbuf: use TEST_RUN > > t/helper/test-example-tap.c | 33 +++ > t/t0080-unit-test-output.sh | 48 +---- > t/t0080/expect | 76 +++++++ > t/unit-tests/t-ctype.c | 4 +- > t/unit-tests/t-reftable-basics.c | 228 +++++++++----------- > t/unit-tests/t-strbuf.c | 79 +++---- > t/unit-tests/t-strvec.c | 356 ++++++++++++++----------------- > t/unit-tests/test-lib.c | 42 +++- > t/unit-tests/test-lib.h | 8 + > 9 files changed, 462 insertions(+), 412 deletions(-) > create mode 100644 t/t0080/expect
So, looking back the discussion list on
https://lore.kernel.org/git/85b6b8a9-ee5f-42ab-bcbc-49976b30ef33@web.de/
any loose ends still need to be addressed? I didn't spot any myself, so I am willing to merge it to 'next' soonish, but please stop me if there were something I missed.
Thanks.