aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlformat/tst_qmlformat.cpp
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@qt.io>2020-02-11 16:32:04 +0100
committerFawzi Mohamed <fawzi.mohamed@qt.io>2020-02-12 18:29:06 +0100
commit229e3220ef521dd4389808fd311ea5ae33ab0cae (patch)
tree8ad1e95c712b132815e29805728fe03114c3b36f /tests/auto/qml/qmlformat/tst_qmlformat.cpp
parent41e8f8a7c6aa4a530abdbc52f8014c4563e85417 (diff)
qmlformat: preserve annotations
Change-Id: I22e72d91f6d422e93a7ebc642a8449cb490aec20 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlformat/tst_qmlformat.cpp')
-rw-r--r--tests/auto/qml/qmlformat/tst_qmlformat.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlformat/tst_qmlformat.cpp b/tests/auto/qml/qmlformat/tst_qmlformat.cpp
index b10eaf26f1..47255d7745 100644
--- a/tests/auto/qml/qmlformat/tst_qmlformat.cpp
+++ b/tests/auto/qml/qmlformat/tst_qmlformat.cpp
@@ -41,6 +41,8 @@ private Q_SLOTS:
void testFormat();
void testFormatNoSort();
+ void testAnnotations();
+ void testAnnotationsNoSort();
void testReadOnlyProps();
@@ -183,6 +185,16 @@ void TestQmlformat::testFormatNoSort()
QCOMPARE(runQmlformat(testFile("Example1.qml"), false, true), readTestFile("Example1.formatted.nosort.qml"));
}
+void TestQmlformat::testAnnotations()
+{
+ QCOMPARE(runQmlformat(testFile("Annotations.qml"), true, true), readTestFile("Annotations.formatted.qml"));
+}
+
+void TestQmlformat::testAnnotationsNoSort()
+{
+ QCOMPARE(runQmlformat(testFile("Annotations.qml"), false, true), readTestFile("Annotations.formatted.nosort.qml"));
+}
+
void TestQmlformat::testReadOnlyProps()
{
QCOMPARE(runQmlformat(testFile("readOnlyProps.qml"), false, true), readTestFile("readOnlyProps.formatted.qml"));