ClangFormat: Reduce dummy text to minimum size

... and tweak continuation dummy text to fix the indentation
for the line with existing text inside parenthesis.

Change-Id: Iaebd2f58823fcbeed24bb7e47769af53261c18ca
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Ivan Donchevskii
2019-03-12 10:49:49 +01:00
parent 5333331362
commit d7eeb0bd90
2 changed files with 16 additions and 3 deletions

View File

@@ -478,6 +478,19 @@ TEST_F(ClangFormat, SameIndentAfterSecondNewLineInsideIfWithFunctionCall)
" )"));
}
TEST_F(ClangFormat, SameIndentAfterSecondNonEmptyNewLineInsideIfWithFunctionCall)
{
insertLines({"if (foo()",
" ",
"bar)"});
indenter.indentBlock(doc.findBlockByNumber(2), QChar::Null, TextEditor::TabSettings());
ASSERT_THAT(documentLines(), ElementsAre("if (foo()",
" ",
" bar)"));
}
TEST_F(ClangFormat, SameIndentsOnNewLinesAfterComments)
{
insertLines({"namespace {} //comment",