diff options
Diffstat (limited to 'tests')
5 files changed, 11 insertions, 1 deletions
diff --git a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp index 8be3311..b27d5d5 100644 --- a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp +++ b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp @@ -447,7 +447,6 @@ void tst_qmlparser::errors_data() QTest::newRow("nonExistantProperty.5") << "nonexistantProperty.5.txt" << "nonexistantProperty.5.errors.txt" << false; QTest::newRow("nonExistantProperty.6") << "nonexistantProperty.6.txt" << "nonexistantProperty.6.errors.txt" << true; - QTest::newRow("wrongType (string for int)") << "wrongType.1.txt" << "wrongType.1.errors.txt" << false; QTest::newRow("wrongType (int for bool)") << "wrongType.2.txt" << "wrongType.2.errors.txt" << false; QTest::newRow("wrongType (bad rect)") << "wrongType.3.txt" << "wrongType.3.errors.txt" << false; @@ -461,6 +460,8 @@ void tst_qmlparser::errors_data() QTest::newRow("wrongType (int for datetime)") << "wrongType.10.txt" << "wrongType.10.errors.txt" << false; QTest::newRow("wrongType (string for point)") << "wrongType.11.txt" << "wrongType.11.errors.txt" << false; QTest::newRow("wrongType (color for size)") << "wrongType.12.txt" << "wrongType.12.errors.txt" << false; + QTest::newRow("wrongType (number string for int)") << "wrongType.13.txt" << "wrongType.13.errors.txt" << false; + QTest::newRow("wrongType (int for string)") << "wrongType.14.txt" << "wrongType.14.errors.txt" << false; QTest::newRow("readOnly.1") << "readOnly.1.txt" << "readOnly.1.errors.txt" << false; QTest::newRow("readOnly.2") << "readOnly.2.txt" << "readOnly.2.errors.txt" << true; diff --git a/tests/auto/declarative/qmlparser/wrongType.13.errors.txt b/tests/auto/declarative/qmlparser/wrongType.13.errors.txt new file mode 100644 index 0000000..7ff4bf3 --- /dev/null +++ b/tests/auto/declarative/qmlparser/wrongType.13.errors.txt @@ -0,0 +1 @@ +2:12:Cannot assign value "12" to property value diff --git a/tests/auto/declarative/qmlparser/wrongType.13.txt b/tests/auto/declarative/qmlparser/wrongType.13.txt new file mode 100644 index 0000000..075ec03 --- /dev/null +++ b/tests/auto/declarative/qmlparser/wrongType.13.txt @@ -0,0 +1,3 @@ +MyQmlObject { + value: "12" +} diff --git a/tests/auto/declarative/qmlparser/wrongType.14.errors.txt b/tests/auto/declarative/qmlparser/wrongType.14.errors.txt new file mode 100644 index 0000000..ec41e01 --- /dev/null +++ b/tests/auto/declarative/qmlparser/wrongType.14.errors.txt @@ -0,0 +1 @@ +2:23:Cannot assign value 10 to property stringProperty diff --git a/tests/auto/declarative/qmlparser/wrongType.14.txt b/tests/auto/declarative/qmlparser/wrongType.14.txt new file mode 100644 index 0000000..3d39c87 --- /dev/null +++ b/tests/auto/declarative/qmlparser/wrongType.14.txt @@ -0,0 +1,4 @@ +MyTypeObject { + stringProperty: 10 +} + |