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()