@@ -545,20 +545,14 @@ void _on_skip(const char *description);
545545 * runner. If the condition is false, the test runner will output the specified
546546 * message and may abort the execution of the test case or test suite.
547547 */
548- #ifdef _WIN32
549- #define _FOSSIL_TEST_ASSUME_MESSAGE (message , ...) \
550- pizza_test_assert_messagef((message), __VA_ARGS__)
551- #elif defined(__APPLE__ )
552- #define _FOSSIL_TEST_ASSUME_MESSAGE (message , ...) \
553- pizza_test_assert_messagef((message) __VA_OPT__(, __VA_ARGS__))
548+ #if defined(__STDC_VERSION__ ) && __STDC_VERSION__ >= 202311L
549+ // C23: __VA_OPT__ is available
550+ #define _FOSSIL_TEST_ASSUME_MESSAGE (message , ...) \
551+ pizza_test_assert_messagef((message) __VA_OPT__(, __VA_ARGS__))
554552#else
555- #if defined(__STDC_VERSION__ ) && __STDC_VERSION__ >= 201710L
556- #define _FOSSIL_TEST_ASSUME_MESSAGE (message , ...) \
557- pizza_test_assert_messagef((message) __VA_OPT__(, __VA_ARGS__))
558- #else
559- #define _FOSSIL_TEST_ASSUME_MESSAGE (message , ...) \
560- pizza_test_assert_messagef((message) , __VA_ARGS__)
561- #endif
553+ // C11 and earlier: use GCC/Clang extension for ##__VA_ARGS__
554+ #define _FOSSIL_TEST_ASSUME_MESSAGE (message , ...) \
555+ pizza_test_assert_messagef((message), ##__VA_ARGS__)
562556#endif
563557
564558/**
0 commit comments