Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions code/logic/fossil/pizza/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -545,20 +545,14 @@ void _on_skip(const char *description);
* runner. If the condition is false, the test runner will output the specified
* message and may abort the execution of the test case or test suite.
*/
#ifdef _WIN32
#define _FOSSIL_TEST_ASSUME_MESSAGE(message, ...) \
pizza_test_assert_messagef((message), __VA_ARGS__)
#elif defined(__APPLE__)
#define _FOSSIL_TEST_ASSUME_MESSAGE(message, ...) \
pizza_test_assert_messagef((message) __VA_OPT__(, __VA_ARGS__))
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
// C23: __VA_OPT__ is available
#define _FOSSIL_TEST_ASSUME_MESSAGE(message, ...) \
pizza_test_assert_messagef((message) __VA_OPT__(, __VA_ARGS__))
#else
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201710L
#define _FOSSIL_TEST_ASSUME_MESSAGE(message, ...) \
pizza_test_assert_messagef((message) __VA_OPT__(, __VA_ARGS__))
#else
#define _FOSSIL_TEST_ASSUME_MESSAGE(message, ...) \
pizza_test_assert_messagef((message) , __VA_ARGS__)
#endif
// Portable workaround: always require at least one argument after 'message'
#define _FOSSIL_TEST_ASSUME_MESSAGE(...) \
pizza_test_assert_messagef(__VA_ARGS__)
#endif

/**
Expand Down