Skip to content

Commit b0a074a

Browse files
committed
test
1 parent e6748d8 commit b0a074a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,6 +1124,17 @@ static void define_va_opt_8()
11241124
ASSERT_EQUALS("", toString(outputList));
11251125
}
11261126

1127+
static void define_va_opt_9()
1128+
{
1129+
try {
1130+
simplecpp::DUI dui;
1131+
dui.defines.emplace_back("f(...)=__VA_OPT__");
1132+
simplecpp::OutputList outputList;
1133+
ASSERT_EQUALS("", preprocess("", dui, &outputList));
1134+
ASSERT_EQUALS("file0,0,dui_error,In definition of 'f': Missing opening parenthesis for __VA_OPT__\n", toString(outputList));
1135+
} catch(...) {}
1136+
}
1137+
11271138
static void define_ifdef()
11281139
{
11291140
const char code[] = "#define A(X) X\n"
@@ -3739,6 +3750,7 @@ int main(int argc, char **argv)
37393750
TEST_CASE(define_va_opt_6);
37403751
TEST_CASE(define_va_opt_7);
37413752
TEST_CASE(define_va_opt_8);
3753+
TEST_CASE(define_va_opt_9); // #632
37423754

37433755
TEST_CASE(pragma_backslash); // multiline pragma directive
37443756

0 commit comments

Comments
 (0)