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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2023-12-02 09:47:11 +01:00
parent c7ce20f01f
commit 72420d39d7
+9 -9
View File
@@ -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);