diff --git a/tests/include/tc_util.h b/tests/include/tc_util.h index a2517a893da..85a3e8fff16 100644 --- a/tests/include/tc_util.h +++ b/tests/include/tc_util.h @@ -80,14 +80,14 @@ #define TC_END(result, fmt, ...) PRINT_DATA(fmt, ##__VA_ARGS__) /* prints result and the function name */ -#define _TC_END_RESULT(result, func) \ - do { \ - PRINT_LINE; \ - TC_END(result, "%s - %s.\n", \ - result == TC_PASS ? PASS : FAIL, func); \ +#define _TC_END_RESULT(result, func) \ + do { \ + PRINT_LINE; \ + TC_END(result, "%s - %s.\n", \ + (result) == TC_PASS ? PASS : FAIL, func); \ } while (0) #define TC_END_RESULT(result) \ - _TC_END_RESULT(result, __func__) + _TC_END_RESULT((result), __func__) #define TC_END_REPORT(result) \ do { \ @@ -95,7 +95,7 @@ TC_PRINT_RUNID; \ TC_END(result, \ "PROJECT EXECUTION %s\n", \ - result == TC_PASS ? "SUCCESSFUL" : "FAILED"); \ + (result) == TC_PASS ? "SUCCESSFUL" : "FAILED"); \ } while (0) #endif /* __TC_UTIL_H__ */