test case stringify3 added

This commit is contained in:
Reijo Tomperi 2009-03-15 23:39:58 +02:00
parent 21b687b301
commit 1c74978a92
1 changed files with 12 additions and 0 deletions

View File

@ -108,6 +108,7 @@ private:
TEST_CASE(stringify); TEST_CASE(stringify);
TEST_CASE(stringify2); TEST_CASE(stringify2);
// TODO TEST_CASE(stringify3);
TEST_CASE(ifdefwithfile); TEST_CASE(ifdefwithfile);
TEST_CASE(pragma); TEST_CASE(pragma);
} }
@ -763,6 +764,17 @@ private:
ASSERT_EQUALS("\ng(\"abc\");", actual); ASSERT_EQUALS("\ng(\"abc\");", actual);
} }
void stringify3()
{
const char filedata[] = "#define A(x) g(#x)\n"
"A( abc);";
// expand macros..
std::string actual = OurPreprocessor::expandMacros(filedata);
ASSERT_EQUALS("\ng(\"abc\");", actual);
}
void pragma() void pragma()
{ {
const char filedata[] = "#pragma once\n" const char filedata[] = "#pragma once\n"