Preprocessor: Added TODO test case for #2563

This commit is contained in:
Daniel Marjamäki 2011-02-20 20:11:51 +01:00
parent 5dea79a07d
commit f6e6fa685e
1 changed files with 17 additions and 0 deletions

View File

@ -119,6 +119,7 @@ private:
TEST_CASE(if_cond9);
TEST_CASE(if_cond10);
TEST_CASE(if_cond11);
TEST_CASE(if_cond12);
TEST_CASE(if_or_1);
TEST_CASE(if_or_2);
@ -1340,6 +1341,22 @@ private:
ASSERT_EQUALS("", errout.str());
}
void if_cond12()
{
errout.str("");
const char filedata[] = "#define A (1)\n"
"#if A == 1\n"
";\n"
"#endif\n";
std::istringstream istr(filedata);
std::map<std::string, std::string> actual;
Settings settings;
Preprocessor preprocessor(&settings, this);
preprocessor.preprocess(istr, actual, "file.c");
ASSERT_EQUALS("", errout.str());
TODO_ASSERT_EQUALS("\n\n;\n\n", "\n\n\n\n", actual[""]);
}
void if_or_1()