Skip to content

Commit 39ef4bb

Browse files
committed
s
1 parent 153ecf6 commit 39ef4bb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,16 @@ static void define_va_opt_7()
10671067
toString(outputList));
10681068
}
10691069

1070+
static void define_va_opt_8()
1071+
{
1072+
const char code[] = "#define f(...) #__VA_OPT__(x)\n"
1073+
"const char* v1 = f();";
1074+
1075+
simplecpp::OutputList outputList;
1076+
ASSERT_EQUALS("\nconst char * v1 = \"\" ;", preprocess(code, &outputList));
1077+
ASSERT_EQUALS("", toString(outputList));
1078+
}
1079+
10701080
static void define_ifdef()
10711081
{
10721082
const char code[] = "#define A(X) X\n"
@@ -3605,6 +3615,7 @@ int main(int argc, char **argv)
36053615
TEST_CASE(define_va_opt_5);
36063616
TEST_CASE(define_va_opt_6);
36073617
TEST_CASE(define_va_opt_7);
3618+
TEST_CASE(define_va_opt_8);
36083619

36093620
TEST_CASE(pragma_backslash); // multiline pragma directive
36103621

0 commit comments

Comments
 (0)