File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1041,6 +1041,16 @@ static void define_va_opt_7()
10411041 toString (outputList));
10421042}
10431043
1044+ static void define_va_opt_8 ()
1045+ {
1046+ const char code[] = " #define f(...) #__VA_OPT__(x)\n "
1047+ " const char* v1 = f();" ;
1048+
1049+ simplecpp::OutputList outputList;
1050+ ASSERT_EQUALS (" \n const char * v1 = \"\" ;" , preprocess (code, &outputList));
1051+ ASSERT_EQUALS (" " , toString (outputList));
1052+ }
1053+
10441054static void define_ifdef ()
10451055{
10461056 const char code[] = " #define A(X) X\n "
@@ -3350,6 +3360,7 @@ int main(int argc, char **argv)
33503360 TEST_CASE (define_va_opt_5);
33513361 TEST_CASE (define_va_opt_6);
33523362 TEST_CASE (define_va_opt_7);
3363+ TEST_CASE (define_va_opt_8);
33533364
33543365 TEST_CASE (pragma_backslash); // multiline pragma directive
33553366
You can’t perform that action at this time.
0 commit comments