File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -442,6 +442,15 @@ static void test_mixing_GET_ARG_and_FOR_EACH(void)
442442 zassert_equal (a[4 ], 5 , NULL );
443443}
444444
445+ static void test_REVERSE_ARGS (void )
446+ {
447+ int y[] = {REVERSE_ARGS (1 , 2 , 3 )};
448+
449+ zassert_equal (y[0 ], 3 , NULL );
450+ zassert_equal (y[1 ], 2 , NULL );
451+ zassert_equal (y[2 ], 1 , NULL );
452+ }
453+
445454#if __cplusplus
446455extern " C" void test_cxx (void );
447456void test_cxx (void )
@@ -470,7 +479,8 @@ void test_cc(void)
470479 ztest_unit_test (test_nested_FOR_EACH),
471480 ztest_unit_test (test_GET_ARG_N),
472481 ztest_unit_test (test_GET_ARGS_LESS_N),
473- ztest_unit_test (test_mixing_GET_ARG_and_FOR_EACH)
482+ ztest_unit_test (test_mixing_GET_ARG_and_FOR_EACH),
483+ ztest_unit_test (test_REVERSE_ARGS)
474484 );
475485
476486 ztest_run_test_suite (test_lib_sys_util_tests);
You can’t perform that action at this time.
0 commit comments