Skip to content

Commit

Permalink
[utest] 修复UTEST_UNIT_RUN嵌套宏时将宏直接输出的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
mysterywolf committed Jan 8, 2025
1 parent 0a25fcf commit 88920fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/utilities/utest/utest.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,13 @@ utest_t utest_handle_get(void);
* @return None
*
*/
#define UTEST_UNIT_RUN(test_unit_func) \
#define _UTEST_UNIT_RUN(test_unit_func) \
do { \
utest_unit_run(test_unit_func, #test_unit_func); \
} while (0)

#define UTEST_UNIT_RUN(test_unit_func) _UTEST_UNIT_RUN(test_unit_func)

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit 88920fd

Please sign in to comment.