Astyle fix
This commit is contained in:
parent
5be85d71a0
commit
765da17132
|
@ -449,16 +449,16 @@ std::string Preprocessor::getcode(const std::string &filedata, std::string cfg)
|
|||
}
|
||||
|
||||
if (line.find("#file \"") == 0 ||
|
||||
line.find("#endfile") == 0 )
|
||||
line.find("#endfile") == 0)
|
||||
{
|
||||
// We must not remove #file tags or line numbers
|
||||
// are corrupted. File tags are removed by the tokenizer.
|
||||
}
|
||||
else if (!match ||
|
||||
line.find("#if") == 0 ||
|
||||
line.find("#else") == 0 ||
|
||||
line.find("#elif") == 0 ||
|
||||
line.find("#endif") == 0)
|
||||
line.find("#if") == 0 ||
|
||||
line.find("#else") == 0 ||
|
||||
line.find("#elif") == 0 ||
|
||||
line.find("#endif") == 0)
|
||||
line = "";
|
||||
|
||||
ret << line << "\n";
|
||||
|
|
|
@ -342,10 +342,10 @@ private:
|
|||
preprocessor.preprocess(istr, actual, "file.c");
|
||||
|
||||
Tokenizer tok;
|
||||
std::istringstream codeStream( actual[""] );
|
||||
tok.tokenize( codeStream, "main.cpp" );
|
||||
std::istringstream codeStream(actual[""]);
|
||||
tok.tokenize(codeStream, "main.cpp");
|
||||
|
||||
ASSERT_EQUALS( "\n\n##file 0\n1:\n2:\n3:\n4: int main ( ) { }\n", tok.tokens()->stringifyList() );
|
||||
ASSERT_EQUALS("\n\n##file 0\n1:\n2:\n3:\n4: int main ( ) { }\n", tok.tokens()->stringifyList());
|
||||
|
||||
// Expected configurations: "" and "ABC"
|
||||
ASSERT_EQUALS(2, static_cast<unsigned int>(actual.size()));
|
||||
|
|
Loading…
Reference in New Issue