[PATCH 3/6] t-ctype: use TEST_RUN
- From
René Scharfe <l.s.r@web.de>
- Date
- Jun 29, 2024, 15:44 UTC
- Message-ID
- <abb96bfc-ed97-4c8e-a99a-0dadce45398e@web.de>
- In-Reply-To
- <85b6b8a9-ee5f-42ab-bcbc-49976b30ef33@web.de>
Use the macro TEST_RUN instead of the internal functions test__run_begin() and test__run_end().
Signed-off-by: René Scharfe <l.s.r@web.de> --- t/unit-tests/t-ctype.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/t/unit-tests/t-ctype.c b/t/unit-tests/t-ctype.c index d6ac1fe678..04a66dc105 100644 --- a/t/unit-tests/t-ctype.c +++ b/t/unit-tests/t-ctype.c @@ -4,15 +4,13 @@ size_t len = ARRAY_SIZE(string) - 1 + \ BUILD_ASSERT_OR_ZERO(ARRAY_SIZE(string) > 0) + \ BUILD_ASSERT_OR_ZERO(sizeof(string[0]) == sizeof(char)); \ - int skip = test__run_begin(); \ - if (!skip) { \ + if (TEST_RUN(#class " works")) { \ for (int i = 0; i < 256; i++) { \ if (!check_int(class(i), ==, !!memchr(string, i, len)))\ test_msg(" i: 0x%02x", i); \ } \ check(!class(EOF)); \ } \ - test__run_end(!skip, TEST_LOCATION(), #class " works"); \ } while (0) #define DIGIT "0123456789" -- 2.45.2