Test case stringify2() added.

This commit is contained in:
Reijo Tomperi 2009-03-15 16:05:23 +02:00
parent ca7870af33
commit b26955b9f8
1 changed files with 12 additions and 0 deletions

View File

@ -107,6 +107,7 @@ private:
TEST_CASE(multi_character_character);
TEST_CASE(stringify);
// TODO TEST_CASE(stringify2);
TEST_CASE(ifdefwithfile);
TEST_CASE(pragma);
}
@ -751,6 +752,17 @@ private:
ASSERT_EQUALS("\n\"abc\"", actual);
}
void stringify2()
{
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()
{
const char filedata[] = "#pragma once\n"