From 7a9e25b445ecc3d744bc46a97b4f05f87dcc614e Mon Sep 17 00:00:00 2001 From: epsilonrt Date: Tue, 8 Aug 2023 22:15:56 +0200 Subject: [PATCH] fix: fixes TEST_PRINTF() expansion error #691 fixes TEST_PRINTF() expansion error when no variadic arguments are passed --- src/unity.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unity.h b/src/unity.h index e321a1d..77dfc12 100644 --- a/src/unity.h +++ b/src/unity.h @@ -105,7 +105,7 @@ void verifyTest(void); #define TEST_MESSAGE(message) UnityMessage((message), __LINE__) #define TEST_ONLY() #ifdef UNITY_INCLUDE_PRINT_FORMATTED -#define TEST_PRINTF(message, ...) UnityPrintF(__LINE__, (message), __VA_ARGS__) +#define TEST_PRINTF(message, ...) UnityPrintF(__LINE__, (message), ##__VA_ARGS__) #endif /* It is not necessary for you to call PASS. A PASS condition is assumed if nothing fails.