From b5423af0511f24c8648cb0f4e8e8a2eaef0f27fc Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 13 May 2009 09:06:49 +1000 Subject: Add two more test cases to tst_qmlparser. --- tests/auto/declarative/qmlparser/tst_qmlparser.cpp | 3 ++- tests/auto/declarative/qmlparser/wrongType.13.errors.txt | 1 + tests/auto/declarative/qmlparser/wrongType.13.txt | 3 +++ tests/auto/declarative/qmlparser/wrongType.14.errors.txt | 1 + tests/auto/declarative/qmlparser/wrongType.14.txt | 4 ++++ 5 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 tests/auto/declarative/qmlparser/wrongType.13.errors.txt create mode 100644 tests/auto/declarative/qmlparser/wrongType.13.txt create mode 100644 tests/auto/declarative/qmlparser/wrongType.14.errors.txt create mode 100644 tests/auto/declarative/qmlparser/wrongType.14.txt diff --git a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp index a3b94db..7b6d7aa 100644 --- a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp +++ b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp @@ -399,7 +399,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("nonExistantProperty.1") << "readOnly.1.txt" << "readOnly.1.errors.txt" << false; QTest::newRow("nonExistantProperty.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 +} + -- cgit v0.12