testsuite: ztest: Fix concatenation in macro
Use UTIL_CAT which resolves input arguments instead of direct preprocessor concatenation. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
8426cbdf8a
commit
eb9814c626
1 changed files with 9 additions and 8 deletions
|
@ -104,7 +104,8 @@ extern struct ztest_suite_node _ztest_suite_node_list_end[];
|
||||||
* @param teardown_fn The function to call after running all the tests in this suite
|
* @param teardown_fn The function to call after running all the tests in this suite
|
||||||
*/
|
*/
|
||||||
#define ZTEST_SUITE(SUITE_NAME, PREDICATE, setup_fn, before_fn, after_fn, teardown_fn) \
|
#define ZTEST_SUITE(SUITE_NAME, PREDICATE, setup_fn, before_fn, after_fn, teardown_fn) \
|
||||||
static STRUCT_SECTION_ITERABLE(ztest_suite_node, z_ztest_test_node_ ## SUITE_NAME) = { \
|
static STRUCT_SECTION_ITERABLE(ztest_suite_node, \
|
||||||
|
UTIL_CAT(z_ztest_test_node_, SUITE_NAME)) = { \
|
||||||
.name = STRINGIFY(SUITE_NAME), \
|
.name = STRINGIFY(SUITE_NAME), \
|
||||||
.setup = (setup_fn), \
|
.setup = (setup_fn), \
|
||||||
.before = (before_fn), \
|
.before = (before_fn), \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue