aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp')
-rw-r--r--tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp b/tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp
index 8d2194086b2..934bf5d317d 100644
--- a/tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp
+++ b/tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp
@@ -83,6 +83,7 @@ private Q_SLOTS:
void bug1();
void bug2();
void bug3();
+ void indentFunctionWithReturnTypeAnnotation();
};
enum { DontCheck = -2, DontIndent = -1 };
@@ -1564,6 +1565,18 @@ void tst_QMLCodeFormatter::bug3()
checkIndent(data);
}
+
+void tst_QMLCodeFormatter::indentFunctionWithReturnTypeAnnotation()
+{
+ QList<Line> data;
+ data << Line("function test() : void {", 0)
+ << Line("", 4)
+ << Line(" }", 0)
+ ;
+ checkIndent(data);
+}
+
+
QTEST_GUILESS_MAIN(tst_QMLCodeFormatter)
#include "tst_qmlcodeformatter.moc"