tests: add util.h MACRO_MAP_CAT test
This wasn't tested when it was first added. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
parent
bd8410cf3c
commit
3c7a939743
1 changed files with 11 additions and 0 deletions
|
@ -153,6 +153,16 @@ void test_UTIL_LISTIFY(void)
|
|||
zassert_equal(a3, 6, NULL);
|
||||
}
|
||||
|
||||
void test_MACRO_MAP_CAT(void)
|
||||
{
|
||||
int item_a_item_b_item_c_ = 1;
|
||||
|
||||
#undef FOO
|
||||
#define FOO(x) item_##x##_
|
||||
zassert_equal(MACRO_MAP_CAT(FOO, a, b, c), 1, "MACRO_MAP_CAT");
|
||||
#undef FOO
|
||||
}
|
||||
|
||||
static int inc_func(void)
|
||||
{
|
||||
static int a = 1;
|
||||
|
@ -182,6 +192,7 @@ void test_main(void)
|
|||
ztest_unit_test(test_COND_CODE_0),
|
||||
ztest_unit_test(test_IF_ENABLED),
|
||||
ztest_unit_test(test_UTIL_LISTIFY),
|
||||
ztest_unit_test(test_MACRO_MAP_CAT),
|
||||
ztest_unit_test(test_z_max_z_min)
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue