Skip to content

Commit e51d7ef

Browse files
rscharfegitster
authored andcommitted
t-ctype: use if_test
Use the documented macro if_test instead of the internal functions test__run_begin() and test__run_end(), which are supposed to be private to the unit test framework. Signed-off-by: René Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 96c6304 commit e51d7ef

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

t/unit-tests/t-ctype.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44
size_t len = ARRAY_SIZE(string) - 1 + \
55
BUILD_ASSERT_OR_ZERO(ARRAY_SIZE(string) > 0) + \
66
BUILD_ASSERT_OR_ZERO(sizeof(string[0]) == sizeof(char)); \
7-
int skip = test__run_begin(); \
8-
if (!skip) { \
7+
if_test (#class " works") { \
98
for (int i = 0; i < 256; i++) { \
109
if (!check_int(class(i), ==, !!memchr(string, i, len)))\
1110
test_msg(" i: 0x%02x", i); \
1211
} \
1312
check(!class(EOF)); \
1413
} \
15-
test__run_end(!skip, TEST_LOCATION(), #class " works"); \
1614
} while (0)
1715

1816
#define DIGIT "0123456789"

0 commit comments

Comments
 (0)