Skip to content

Commit

Permalink
TODO test case for preprocessor macro handling
Browse files Browse the repository at this point in the history
  • Loading branch information
aggro80 committed Sep 14, 2009
1 parent 0203217 commit 92b8593
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions test/testpreprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -877,10 +877,19 @@ class TestPreprocessor : public TestFixture

void macroInMacro()
{
const char filedata[] = "#define A(m) long n = m; n++;\n"
"#define B(n) A(n)\n"
"B(0)";
ASSERT_EQUALS("\n\nlong n=0;n++;", OurPreprocessor::expandMacros(filedata));
{
const char filedata[] = "#define A(m) long n = m; n++;\n"
"#define B(n) A(n)\n"
"B(0)";
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()
Expand Down

0 comments on commit 92b8593

Please sign in to comment.