Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for modern uncrustify. #793

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions rosidl_generator_tests/test/rosidl_generator_c/test_interfaces.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,16 @@
u"Deep into that darkness peering, long I stood there wondering, fearing \u2122"
#define ARR_SIZE 3

#define STRINGIFY(x) _STRINGIFY(x)
#define _STRINGIFY(x) #x
#define STRINGIFY(x) _STRINGIFY(x)

#define EXPECT_FALSE(arg) if (arg) { \
fputs(STRINGIFY(arg) " is not false\n", stderr); \
return 1; \
}
#define EXPECT_TRUE(arg) if (!(arg)) { \
fputs(STRINGIFY(arg) " is not true\n", stderr); \
return 1; \
}
#define EXPECT_EQ(arg1, arg2) if ((arg1) != (arg2)) { \
fputs(STRINGIFY(arg1) " != " STRINGIFY(arg2) "\n", stderr); \
return 1; \
}
#define PUTS(arg, extra) fprintf(stderr, "%s%s\n", STRINGIFY(arg), extra)
clalancette marked this conversation as resolved.
Show resolved Hide resolved

#define EXPECT_FALSE(arg) if (arg) {PUTS(arg, " is not false"); return 1;}
#define EXPECT_TRUE(arg) if (!(arg)) {PUTS(arg, " is not true"); return 1;}

#define PUTS_NE(arg1, arg2) fprintf(stderr, "%s != %s\n", STRINGIFY(arg1), STRINGIFY(arg2))
#define EXPECT_EQ(arg1, arg2) if ((arg1) != (arg2)) {PUTS_NE(arg1, arg2); return 1;}
#define EXPECT_NE(arg1, arg2) if ((arg1) == (arg2)) return 1

static const uint8_t test_values_byte[ARR_SIZE] = {0, 57, 110};
Expand Down
Loading