forked from qt-creator/qt-creator
CppTools: Fix indentation for concatenated strings
Change-Id: I801a56804e7873be75a9ebc085dc3f4a2d64ea35 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
5416557a0b
commit
aeb2cfbc4f
@@ -128,6 +128,7 @@ private Q_SLOTS:
|
||||
void attributeInAccessSpecifier();
|
||||
void braceReturn();
|
||||
void staticVarDeclWithTypeDecl();
|
||||
void strings();
|
||||
};
|
||||
|
||||
struct Line {
|
||||
@@ -2154,6 +2155,23 @@ void tst_CodeFormatter::staticVarDeclWithTypeDecl()
|
||||
checkIndent(data);
|
||||
}
|
||||
|
||||
void tst_CodeFormatter::strings()
|
||||
{
|
||||
QList<Line> data;
|
||||
data << Line("char *a = \"foo\"")
|
||||
<< Line(" \"bar\" \"why\"")
|
||||
<< Line(" \"baz\";")
|
||||
<< Line("void foo()")
|
||||
<< Line("{")
|
||||
<< Line(" func(1, 2, \"foo\"")
|
||||
<< Line(" \"bar\"")
|
||||
<< Line(" \"baz\", 4,")
|
||||
<< Line(" ~ 5, 6);")
|
||||
<< Line("}")
|
||||
;
|
||||
checkIndent(data);
|
||||
}
|
||||
|
||||
QTEST_MAIN(tst_CodeFormatter)
|
||||
|
||||
#include "tst_codeformatter.moc"
|
||||
|
||||
Reference in New Issue
Block a user