From f6e6fa685e6bdefe839869d1bbf7320aa1034eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 20 Feb 2011 20:11:51 +0100 Subject: [PATCH] Preprocessor: Added TODO test case for #2563 --- test/testpreprocessor.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/testpreprocessor.cpp b/test/testpreprocessor.cpp index 7f032b3e6..b3ca40855 100644 --- a/test/testpreprocessor.cpp +++ b/test/testpreprocessor.cpp @@ -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 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()