diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-09-10 00:19:33 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-09-10 00:19:33 (GMT) |
commit | a250db23c96fc1ec47ea4d19d62a19cad7c50b46 (patch) | |
tree | 640237f325d4a734ecc42c042812a497c7a1f190 /tests | |
parent | d3bd0567fbc16263fcb181d58529e6d7aeee1bbd (diff) | |
download | Qt-a250db23c96fc1ec47ea4d19d62a19cad7c50b46.zip Qt-a250db23c96fc1ec47ea4d19d62a19cad7c50b46.tar.gz Qt-a250db23c96fc1ec47ea4d19d62a19cad7c50b46.tar.bz2 |
Report custom parse errors verbosely.
Diffstat (limited to 'tests')
3 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/declarative/qmlparser/customParserIdNotAllowed.errors.txt b/tests/auto/declarative/qmlparser/customParserIdNotAllowed.errors.txt new file mode 100644 index 0000000..d28c0bd --- /dev/null +++ b/tests/auto/declarative/qmlparser/customParserIdNotAllowed.errors.txt @@ -0,0 +1 @@ +4:19:Cannot use reserved "id" property in ListModel diff --git a/tests/auto/declarative/qmlparser/customParserIdNotAllowed.qml b/tests/auto/declarative/qmlparser/customParserIdNotAllowed.qml new file mode 100644 index 0000000..e607768 --- /dev/null +++ b/tests/auto/declarative/qmlparser/customParserIdNotAllowed.qml @@ -0,0 +1,5 @@ +import Qt 4.6 +ListModel { + ListElement { a: 10 } + ListElement { id: Foo; a: 12 } +} diff --git a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp index e3735e7..25dfd27 100644 --- a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp +++ b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp @@ -159,6 +159,8 @@ void tst_qmlparser::errors_data() QTest::newRow("finalOverride") << "finalOverride.qml" << "finalOverride.errors.txt" << false; QTest::newRow("importNamespaceConflict") << "importNamespaceConflict.qml" << "importNamespaceConflict.errors.txt" << false; + + QTest::newRow("customParserIdNotAllowed") << "customParserIdNotAllowed.qml" << "customParserIdNotAllowed.errors.txt" << false; } void tst_qmlparser::errors() @@ -311,7 +313,7 @@ void tst_qmlparser::assignTypeExtremes() QCOMPARE(object->intProperty(), -0x77359400); } -// Tests that custom parser tyeps can be instantiated +// Tests that custom parser types can be instantiated void tst_qmlparser::customParserTypes() { QmlComponent component(&engine, TEST_FILE("customParserTypes.qml")); |