diff options
Diffstat (limited to 'tests/auto/qml/qmllint')
-rw-r--r-- | tests/auto/qml/qmllint/data/attached.qml | 5 | ||||
-rw-r--r-- | tests/auto/qml/qmllint/data/badAttached.qml | 5 | ||||
-rw-r--r-- | tests/auto/qml/qmllint/tst_qmllint.cpp | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/data/attached.qml b/tests/auto/qml/qmllint/data/attached.qml new file mode 100644 index 0000000000..0fcf3cacc6 --- /dev/null +++ b/tests/auto/qml/qmllint/data/attached.qml @@ -0,0 +1,5 @@ +import QtQml + +QtObject { + Component.objectName: "foobar" +} diff --git a/tests/auto/qml/qmllint/data/badAttached.qml b/tests/auto/qml/qmllint/data/badAttached.qml new file mode 100644 index 0000000000..93d64ec8ae --- /dev/null +++ b/tests/auto/qml/qmllint/data/badAttached.qml @@ -0,0 +1,5 @@ +import QtQml + +QtObject { + WrongAttached.foo: "bar" +} diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp index c8e0dd2db3..a86c202790 100644 --- a/tests/auto/qml/qmllint/tst_qmllint.cpp +++ b/tests/auto/qml/qmllint/tst_qmllint.cpp @@ -302,6 +302,10 @@ void TestQmllint::dirtyQmlCode_data() << QStringLiteral("onAssignment.qml") << QStringLiteral("Property \"loops\" not found on type \"bool\"") << QString(); + QTest::newRow("BadAttached") + << QStringLiteral("badAttached.qml") + << QStringLiteral("unknown attached property scope WrongAttached.") + << QString(); } void TestQmllint::dirtyQmlCode() @@ -366,6 +370,7 @@ void TestQmllint::cleanQmlCode_data() QTest::newRow("segFault") << QStringLiteral("SegFault.qml"); QTest::newRow("grouped scope failure") << QStringLiteral("groupedScope.qml"); QTest::newRow("layouts depends quick") << QStringLiteral("layouts.qml"); + QTest::newRow("attached") << QStringLiteral("attached.qml"); } void TestQmllint::cleanQmlCode() |