Skip to content

Commit 6befcb9

Browse files
Allow optional details parameter in rich assertions.
1 parent d33cd47 commit 6befcb9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

antithesis_sdk.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ namespace { // Anonymous namespace which is translation-unit-specific; certain s
906906
#define ANTITHESIS_NUMERIC_ASSERT_RAW(name, assertion_type, guidepost_type, left, cmp, right, message, ...) \
907907
do { \
908908
static_assert(std::is_same_v<decltype(left), decltype(right)>, "Values compared in " #name " must be of same type"); \
909-
ANTITHESIS_ASSERT_RAW(assertion_type, left cmp right, message, __VA_ARGS__, {{ "left", left }, { "right", right }} ); \
909+
ANTITHESIS_ASSERT_RAW(assertion_type, left cmp right, message, __VA_ARGS__ __VA_OPT__(,) {{ "left", left }, { "right", right }} ); \
910910
antithesis::internal::NumericGuidanceCatalogEntry< \
911911
decltype(left), \
912912
guidepost_type, \
@@ -952,7 +952,7 @@ do { \
952952
FIXED_STRING_FROM_C_STR(std::source_location::current().function_name()), \
953953
std::source_location::current().line(), \
954954
std::source_location::current().column() \
955-
>::assertion.check_assertion(disjunction, (antithesis::JSON(__VA_ARGS__, pairs)) ); \
955+
>::assertion.check_assertion(disjunction, (antithesis::JSON(__VA_ARGS__ __VA_OPT__(,) pairs)) ); \
956956
antithesis::JSON json_pairs = antithesis::JSON(pairs); \
957957
antithesis::internal::BooleanGuidanceCatalogEntry< \
958958
decltype(json_pairs), \
@@ -982,7 +982,7 @@ do { \
982982
FIXED_STRING_FROM_C_STR(std::source_location::current().function_name()), \
983983
std::source_location::current().line(), \
984984
std::source_location::current().column() \
985-
>::assertion.check_assertion(conjunction, (antithesis::JSON(__VA_ARGS__, pairs)) ); \
985+
>::assertion.check_assertion(conjunction, (antithesis::JSON(__VA_ARGS__ __VA_OPT__(,) pairs)) ); \
986986
antithesis::JSON json_pairs = antithesis::JSON(pairs); \
987987
BooleanGuidanceCatalogEntry< \
988988
decltype(json_pairs), \

0 commit comments

Comments
 (0)