From 72420d39d7e3edefb1973395a9918d1d6509b168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 26 Nov 2023 15:54:11 +0100 Subject: [PATCH] test-macro: use capital test names for macro tests It's just easier if the test is named as the thing being tested. Also, this way inconsistent, because lower in the file uppercase test names are used. --- src/test/test-macro.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/test/test-macro.c b/src/test/test-macro.c index 63fe6ea95e..b91a1f96ac 100644 --- a/src/test/test-macro.c +++ b/src/test/test-macro.c @@ -15,7 +15,7 @@ TEST(saturate_add) { assert_se(saturate_add(60, 60, 50) == 50); } -TEST(align_power2) { +TEST(ALIGN_POWER2) { unsigned long i, p2; assert_se(ALIGN_POWER2(0) == 0); @@ -57,7 +57,7 @@ TEST(align_power2) { } } -TEST(max) { +TEST(MAX) { static const struct { int a; int b[CONST_MAX(10, 100)]; @@ -159,7 +159,7 @@ TEST(container_of) { #pragma GCC diagnostic pop -TEST(div_round_up) { +TEST(DIV_ROUND_UP) { int div; /* basic tests */ @@ -192,7 +192,7 @@ TEST(div_round_up) { assert_se(0xfffffffdU / 10U + !!(0xfffffffdU % 10U) == 429496730U); } -TEST(ptr_to_int) { +TEST(PTR_TO_INT) { /* Primary reason to have this test is to validate that pointers are large enough to hold entire int range */ assert_se(PTR_TO_INT(INT_TO_PTR(0)) == 0); assert_se(PTR_TO_INT(INT_TO_PTR(1)) == 1); @@ -201,7 +201,7 @@ TEST(ptr_to_int) { assert_se(PTR_TO_INT(INT_TO_PTR(INT_MIN)) == INT_MIN); } -TEST(in_set) { +TEST(IN_SET) { assert_se(IN_SET(1, 1, 2)); assert_se(IN_SET(1, 1, 2, 3, 4)); assert_se(IN_SET(2, 1, 2, 3, 4)); @@ -221,7 +221,7 @@ TEST(in_set) { assert_se(!IN_SET(t.x, 2, 3, 4)); } -TEST(foreach_pointer) { +TEST(FOREACH_POINTER) { int a, b, c, *i; size_t k = 0; @@ -300,7 +300,7 @@ TEST(foreach_pointer) { assert_se(k == 11); } -TEST(foreach_va_args) { +TEST(FOREACH_VA_ARGS) { size_t i; i = 0; @@ -484,7 +484,7 @@ TEST(foreach_va_args) { assert_se(false); } -TEST(align_to) { +TEST(ALIGN_TO) { assert_se(ALIGN_TO(0, 1) == 0); assert_se(ALIGN_TO(1, 1) == 1); assert_se(ALIGN_TO(2, 1) == 2); @@ -1005,7 +1005,7 @@ TEST(FOREACH_ARRAY) { assert_se(ROUND_UP(x, y) == max_value); \ }) -TEST(round_up) { +TEST(ROUND_UP) { TEST_ROUND_UP_BY_TYPE(uint8_t, UINT8_MAX); TEST_ROUND_UP_BY_TYPE(uint16_t, UINT16_MAX); TEST_ROUND_UP_BY_TYPE(uint32_t, UINT32_MAX);