aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml')
-rw-r--r--tests/auto/qml/qmlformat/data/emptyObject.formatted.qml5
-rw-r--r--tests/auto/qml/qmlformat/data/emptyObject.qml3
-rw-r--r--tests/auto/qml/qmlformat/tst_qmlformat.cpp2
3 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlformat/data/emptyObject.formatted.qml b/tests/auto/qml/qmlformat/data/emptyObject.formatted.qml
new file mode 100644
index 0000000000..a3c345db24
--- /dev/null
+++ b/tests/auto/qml/qmlformat/data/emptyObject.formatted.qml
@@ -0,0 +1,5 @@
+Item {
+ binding: {
+ var emptyObject = {};
+ }
+}
diff --git a/tests/auto/qml/qmlformat/data/emptyObject.qml b/tests/auto/qml/qmlformat/data/emptyObject.qml
new file mode 100644
index 0000000000..6855003fcd
--- /dev/null
+++ b/tests/auto/qml/qmlformat/data/emptyObject.qml
@@ -0,0 +1,3 @@
+Item {
+ binding: { var emptyObject = {}; }
+}
diff --git a/tests/auto/qml/qmlformat/tst_qmlformat.cpp b/tests/auto/qml/qmlformat/tst_qmlformat.cpp
index 6f2410854a..45a51dec21 100644
--- a/tests/auto/qml/qmlformat/tst_qmlformat.cpp
+++ b/tests/auto/qml/qmlformat/tst_qmlformat.cpp
@@ -235,6 +235,8 @@ void TestQmlformat::testFormat_data()
<< "forOf.formatted.qml" << false << true;
QTest::newRow("property names") << "propertyNames.qml"
<< "propertyNames.formatted.qml" << false << true;
+ QTest::newRow("empty object") << "emptyObject.qml"
+ << "emptyObject.formatted.qml" << false << true;
}
void TestQmlformat::testFormat()