forked from qt-creator/qt-creator
C++ indenter: Fix extra specifier in return type of func decl.
Like struct Foo bar() { } Change-Id: I946937c23d1660909757952a5a3bd400c4781826 Reviewed-on: http://codereview.qt.nokia.com/13 Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
This commit is contained in:
@@ -91,6 +91,7 @@ private Q_SLOTS:
|
||||
void whitesmithsStyleSwitch();
|
||||
void indentToNextToken();
|
||||
void labels();
|
||||
void functionsWithExtraSpecifier();
|
||||
};
|
||||
|
||||
struct Line {
|
||||
@@ -1178,6 +1179,19 @@ void tst_CodeFormatter::labels()
|
||||
checkIndent(data);
|
||||
}
|
||||
|
||||
void tst_CodeFormatter::functionsWithExtraSpecifier()
|
||||
{
|
||||
QList<Line> data;
|
||||
data << Line("extern void foo() {}")
|
||||
<< Line("struct Foo bar() {}")
|
||||
<< Line("enum Foo bar() {}")
|
||||
<< Line("namespace foo {")
|
||||
<< Line("}")
|
||||
<< Line("int a;")
|
||||
;
|
||||
checkIndent(data);
|
||||
}
|
||||
|
||||
QTEST_APPLESS_MAIN(tst_CodeFormatter)
|
||||
#include "tst_codeformatter.moc"
|
||||
|
||||
|
Reference in New Issue
Block a user