Preprocessor: Fix #if0 #elif todo test case. Ticket: #2619
This commit is contained in:
parent
aa65eed02b
commit
fc0f75fe6a
|
@ -660,7 +660,7 @@ std::string Preprocessor::removeIf0(const std::string &code)
|
|||
++level;
|
||||
else if (line == "#endif")
|
||||
--level;
|
||||
else if (line == "#else")
|
||||
else if ((line == "#else") || (line.compare(0, 5, "#elif") == 0))
|
||||
{
|
||||
if (level == 1)
|
||||
in = true;
|
||||
|
|
|
@ -723,8 +723,7 @@ private:
|
|||
"B\n"
|
||||
"#endif\n"
|
||||
"C\n");
|
||||
TODO_ASSERT_EQUALS("#if 0\n\n#elif 1\nB\n#endif\nC\n",
|
||||
"#if 0\n\n\n\n#endif\nC\n", preprocessor.read(code,"",NULL));
|
||||
ASSERT_EQUALS("#if 0\n\n#elif 1\nB\n#endif\nC\n", preprocessor.read(code,"",NULL));
|
||||
}
|
||||
|
||||
void if0_include_1()
|
||||
|
|
Loading…
Reference in New Issue