Added a few TODO test cases for #971 (Invalid number of characters (())

http://sourceforge.net/apps/trac/cppcheck/ticket/971
This commit is contained in:
Reijo Tomperi 2009-11-18 00:21:21 +02:00
parent bd2ca8babd
commit 8f07e2711c
1 changed files with 14 additions and 0 deletions

View File

@ -1008,6 +1008,20 @@ private:
"B(2);";
ASSERT_EQUALS("\n\n2,4;", OurPreprocessor::expandMacros(filedata));
}
{
const char filedata[] = "#define A(x) (x)\n"
"#define B )A(\n"
"#define C )A(\n";
TODO_ASSERT_EQUALS("\n\n\n", OurPreprocessor::expandMacros(filedata));
}
{
const char filedata[] = "#define A(x) (x*2)\n"
"#define B A(\n"
"foo B(i));\n";
TODO_ASSERT_EQUALS("\n\nfoo ((i)*2);\n", OurPreprocessor::expandMacros(filedata));
}
}
void macro_mismatch()