TODO test case for preprocessor macro handling

This commit is contained in:
Reijo Tomperi 2009-09-14 22:53:57 +03:00
parent 020321769c
commit 92b8593f59
1 changed files with 13 additions and 4 deletions

View File

@ -876,6 +876,7 @@ private:
}
void macroInMacro()
{
{
const char filedata[] = "#define A(m) long n = m; n++;\n"
"#define B(n) A(n)\n"
@ -883,6 +884,14 @@ private:
ASSERT_EQUALS("\n\nlong n=0;n++;", OurPreprocessor::expandMacros(filedata));
}
{
const char filedata[] = "#define A B\n"
"#define B 3\n"
"A";
TODO_ASSERT_EQUALS("\n\n3", OurPreprocessor::expandMacros(filedata));
}
}
void macro_mismatch()
{
const char filedata[] = "#define AAA(aa,bb) f(aa)\n"