diff options
Diffstat (limited to 'tests/auto/qml/qmllint')
-rw-r--r-- | tests/auto/qml/qmllint/data/badBinding.qml | 5 | ||||
-rw-r--r-- | tests/auto/qml/qmllint/data/badPropertyType.qml | 6 | ||||
-rw-r--r-- | tests/auto/qml/qmllint/data/enumProperty.qml | 5 | ||||
-rw-r--r-- | tests/auto/qml/qmllint/tst_qmllint.cpp | 11 |
4 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/data/badBinding.qml b/tests/auto/qml/qmllint/data/badBinding.qml new file mode 100644 index 0000000000..8e781710a2 --- /dev/null +++ b/tests/auto/qml/qmllint/data/badBinding.qml @@ -0,0 +1,5 @@ +import QtQml + +QtObject { + doesNotExist: 12 +} diff --git a/tests/auto/qml/qmllint/data/badPropertyType.qml b/tests/auto/qml/qmllint/data/badPropertyType.qml new file mode 100644 index 0000000000..97484ea0bb --- /dev/null +++ b/tests/auto/qml/qmllint/data/badPropertyType.qml @@ -0,0 +1,6 @@ +import QtQml + +QtObject { + property badtype bad + bad: "abc" +} diff --git a/tests/auto/qml/qmllint/data/enumProperty.qml b/tests/auto/qml/qmllint/data/enumProperty.qml new file mode 100644 index 0000000000..d385346c87 --- /dev/null +++ b/tests/auto/qml/qmllint/data/enumProperty.qml @@ -0,0 +1,5 @@ +import QtQuick.Layouts + +GridLayout { + flow: GridLayout.TopToBottom +} diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp index a86c202790..db44193871 100644 --- a/tests/auto/qml/qmllint/tst_qmllint.cpp +++ b/tests/auto/qml/qmllint/tst_qmllint.cpp @@ -306,6 +306,16 @@ void TestQmllint::dirtyQmlCode_data() << QStringLiteral("badAttached.qml") << QStringLiteral("unknown attached property scope WrongAttached.") << QString(); + QTest::newRow("BadBinding") + << QStringLiteral("badBinding.qml") + << QStringLiteral("Binding assigned to \"doesNotExist\", but no property " + "\"doesNotExist\" exists in the current element.") + << QString(); + QTest::newRow("BadPropertyType") + << QStringLiteral("badPropertyType.qml") + << QStringLiteral("No type found for property \"bad\". This may be due to a missing " + "import statement or incomplete qmltypes files.") + << QString(); } void TestQmllint::dirtyQmlCode() @@ -371,6 +381,7 @@ void TestQmllint::cleanQmlCode_data() QTest::newRow("grouped scope failure") << QStringLiteral("groupedScope.qml"); QTest::newRow("layouts depends quick") << QStringLiteral("layouts.qml"); QTest::newRow("attached") << QStringLiteral("attached.qml"); + QTest::newRow("enumProperty") << QStringLiteral("enumProperty.qml"); } void TestQmllint::cleanQmlCode() |