tests: unit: util: Add test for REVERSE_ARGS
Added test for new macro. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
de84575e2e
commit
9d3326586c
1 changed files with 11 additions and 1 deletions
|
@ -442,6 +442,15 @@ static void test_mixing_GET_ARG_and_FOR_EACH(void)
|
|||
zassert_equal(a[4], 5, NULL);
|
||||
}
|
||||
|
||||
static void test_REVERSE_ARGS(void)
|
||||
{
|
||||
int y[] = {REVERSE_ARGS(1, 2, 3)};
|
||||
|
||||
zassert_equal(y[0], 3, NULL);
|
||||
zassert_equal(y[1], 2, NULL);
|
||||
zassert_equal(y[2], 1, NULL);
|
||||
}
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" void test_cxx(void);
|
||||
void test_cxx(void)
|
||||
|
@ -470,7 +479,8 @@ void test_cc(void)
|
|||
ztest_unit_test(test_nested_FOR_EACH),
|
||||
ztest_unit_test(test_GET_ARG_N),
|
||||
ztest_unit_test(test_GET_ARGS_LESS_N),
|
||||
ztest_unit_test(test_mixing_GET_ARG_and_FOR_EACH)
|
||||
ztest_unit_test(test_mixing_GET_ARG_and_FOR_EACH),
|
||||
ztest_unit_test(test_REVERSE_ARGS)
|
||||
);
|
||||
|
||||
ztest_run_test_suite(test_lib_sys_util_tests);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue