aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlformat/tst_qmlformat.cpp
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2020-06-18 14:36:37 +0200
committerMaximilian Goldstein <max.goldstein@qt.io>2020-06-25 09:02:10 +0200
commiteb90e8ee3313bee547e6721a2649bf9ba84e3e5c (patch)
tree2c578f90d6c2c267498cb7ab919d75c68751ad91 /tests/auto/qml/qmlformat/tst_qmlformat.cpp
parent88b3d1fd26b6b566ef00ae728051bff29455eea5 (diff)
qmlformat: Fix nested functions
Fixes: QTBUG-85035 Change-Id: I5e1cb003b7b84547e3408a086eebf3be740e6860 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlformat/tst_qmlformat.cpp')
-rw-r--r--tests/auto/qml/qmlformat/tst_qmlformat.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlformat/tst_qmlformat.cpp b/tests/auto/qml/qmlformat/tst_qmlformat.cpp
index cda7f0d80f..f1fb0d025f 100644
--- a/tests/auto/qml/qmlformat/tst_qmlformat.cpp
+++ b/tests/auto/qml/qmlformat/tst_qmlformat.cpp
@@ -57,6 +57,7 @@ private Q_SLOTS:
void testInlineComponents();
void testQtbug85003();
+ void testNestedFunctions();
void testNestedIf();
@@ -276,6 +277,12 @@ void TestQmlformat::testQtbug85003()
readTestFile("QtBug85003.formatted.qml"));
}
+void TestQmlformat::testNestedFunctions()
+{
+ QCOMPARE(runQmlformat(testFile("nestedFunctions.qml"), false, true),
+ readTestFile("nestedFunctions.formatted.qml"));
+}
+
#if !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled
void TestQmlformat::testExample_data()
{