diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-11-05 08:30:55 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-11-05 08:30:55 (GMT) |
commit | 1a7cee240904a3aea112fc102901066fe26d45d6 (patch) | |
tree | 9bece7d93b0b54cc82d4f4c865e6974c7353d640 /tests/auto | |
parent | 34aaa28047656a43132933eb86cfdd8f2e63a5b5 (diff) | |
download | Qt-1a7cee240904a3aea112fc102901066fe26d45d6.zip Qt-1a7cee240904a3aea112fc102901066fe26d45d6.tar.gz Qt-1a7cee240904a3aea112fc102901066fe26d45d6.tar.bz2 |
More error-case tests
Diffstat (limited to 'tests/auto')
23 files changed, 82 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmllanguage/data/invalidImportID.errors.txt b/tests/auto/declarative/qmllanguage/data/invalidImportID.errors.txt new file mode 100644 index 0000000..a65f5fd --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/invalidImportID.errors.txt @@ -0,0 +1 @@ +2:18:Invalid import qualifier ID diff --git a/tests/auto/declarative/qmllanguage/data/invalidImportID.qml b/tests/auto/declarative/qmllanguage/data/invalidImportID.qml new file mode 100644 index 0000000..75aa06d --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/invalidImportID.qml @@ -0,0 +1,4 @@ +import Qt 4.6 +import Qt 4.6 as qt + +Object {} diff --git a/tests/auto/declarative/qmllanguage/data/invalidRoot.errors.txt b/tests/auto/declarative/qmllanguage/data/invalidRoot.errors.txt new file mode 100644 index 0000000..4bcc948 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/invalidRoot.errors.txt @@ -0,0 +1 @@ +1:1:Expected type name diff --git a/tests/auto/declarative/qmllanguage/data/invalidRoot.qml b/tests/auto/declarative/qmllanguage/data/invalidRoot.qml new file mode 100644 index 0000000..427827c --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/invalidRoot.qml @@ -0,0 +1,2 @@ +foo { +} diff --git a/tests/auto/declarative/qmllanguage/data/property.1.errors.txt b/tests/auto/declarative/qmllanguage/data/property.1.errors.txt new file mode 100644 index 0000000..3ae6c46 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/property.1.errors.txt @@ -0,0 +1 @@ +4:14:Expected property type diff --git a/tests/auto/declarative/qmllanguage/data/property.1.qml b/tests/auto/declarative/qmllanguage/data/property.1.qml new file mode 100644 index 0000000..62178e5 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/property.1.qml @@ -0,0 +1,5 @@ +import Qt 4.6 + +Object { + property blah a; +} diff --git a/tests/auto/declarative/qmllanguage/data/property.2.errors.txt b/tests/auto/declarative/qmllanguage/data/property.2.errors.txt new file mode 100644 index 0000000..a18e21a --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/property.2.errors.txt @@ -0,0 +1 @@ +4:14:Unexpected property type modifier diff --git a/tests/auto/declarative/qmllanguage/data/property.2.qml b/tests/auto/declarative/qmllanguage/data/property.2.qml new file mode 100644 index 0000000..1d6d015 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/property.2.qml @@ -0,0 +1,6 @@ +import Qt 4.6 + +Object { + property invalidmodifier<int> a; +} + diff --git a/tests/auto/declarative/qmllanguage/data/property.3.errors.txt b/tests/auto/declarative/qmllanguage/data/property.3.errors.txt new file mode 100644 index 0000000..5e09a25 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/property.3.errors.txt @@ -0,0 +1 @@ +4:14:Invalid property type modifier diff --git a/tests/auto/declarative/qmllanguage/data/property.3.qml b/tests/auto/declarative/qmllanguage/data/property.3.qml new file mode 100644 index 0000000..1b14b86 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/property.3.qml @@ -0,0 +1,7 @@ +import Qt 4.6 + +Object { + property invalidmodifier<Object> a; +} + + diff --git a/tests/auto/declarative/qmllanguage/data/property.4.errors.txt b/tests/auto/declarative/qmllanguage/data/property.4.errors.txt new file mode 100644 index 0000000..b447186 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/property.4.errors.txt @@ -0,0 +1 @@ +5:1:Syntax error diff --git a/tests/auto/declarative/qmllanguage/data/property.4.qml b/tests/auto/declarative/qmllanguage/data/property.4.qml new file mode 100644 index 0000000..d256c96 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/property.4.qml @@ -0,0 +1,5 @@ +import Qt 4.6 + +Object { + readonly property int a +} diff --git a/tests/auto/declarative/qmllanguage/data/property.5.errors.txt b/tests/auto/declarative/qmllanguage/data/property.5.errors.txt new file mode 100644 index 0000000..32a8dc1 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/property.5.errors.txt @@ -0,0 +1 @@ +4:5:Readonly not yet supported diff --git a/tests/auto/declarative/qmllanguage/data/property.5.qml b/tests/auto/declarative/qmllanguage/data/property.5.qml new file mode 100644 index 0000000..c3aaf5e --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/property.5.qml @@ -0,0 +1,6 @@ +import Qt 4.6 + +Object { + readonly property int a: value +} + diff --git a/tests/auto/declarative/qmllanguage/data/script.12.errors.txt b/tests/auto/declarative/qmllanguage/data/script.12.errors.txt new file mode 100644 index 0000000..85c8396 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/script.12.errors.txt @@ -0,0 +1 @@ +4:5:QmlJS declaration outside Script element diff --git a/tests/auto/declarative/qmllanguage/data/script.12.qml b/tests/auto/declarative/qmllanguage/data/script.12.qml new file mode 100644 index 0000000..ea6c482 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/script.12.qml @@ -0,0 +1,6 @@ +import Qt 4.6 + +Object { + var a +} + diff --git a/tests/auto/declarative/qmllanguage/data/signal.1.errors.txt b/tests/auto/declarative/qmllanguage/data/signal.1.errors.txt new file mode 100644 index 0000000..78d9960 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/signal.1.errors.txt @@ -0,0 +1 @@ +4:12:Expected parameter type diff --git a/tests/auto/declarative/qmllanguage/data/signal.1.qml b/tests/auto/declarative/qmllanguage/data/signal.1.qml new file mode 100644 index 0000000..d0ad155 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/signal.1.qml @@ -0,0 +1,5 @@ +import Qt 4.6 + +Object { + signal mySignal(nontype a) +} diff --git a/tests/auto/declarative/qmllanguage/data/signal.2.errors.txt b/tests/auto/declarative/qmllanguage/data/signal.2.errors.txt new file mode 100644 index 0000000..fce8928 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/signal.2.errors.txt @@ -0,0 +1 @@ +4:21:Unexpected token `;' diff --git a/tests/auto/declarative/qmllanguage/data/signal.2.qml b/tests/auto/declarative/qmllanguage/data/signal.2.qml new file mode 100644 index 0000000..aa45ae9 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/signal.2.qml @@ -0,0 +1,6 @@ +import Qt 4.6 + +Object { + signal mySignal(,) +} + diff --git a/tests/auto/declarative/qmllanguage/data/signal.3.errors.txt b/tests/auto/declarative/qmllanguage/data/signal.3.errors.txt new file mode 100644 index 0000000..bf043ac --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/signal.3.errors.txt @@ -0,0 +1 @@ +4:22:Expected token `identifier' diff --git a/tests/auto/declarative/qmllanguage/data/signal.3.qml b/tests/auto/declarative/qmllanguage/data/signal.3.qml new file mode 100644 index 0000000..f38ccc5 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/signal.3.qml @@ -0,0 +1,6 @@ +import Qt 4.6 + +Object { + signal mySignal(a) +} + diff --git a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp index 0fa36a1..c646583 100644 --- a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp +++ b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp @@ -246,6 +246,17 @@ void tst_qmllanguage::errors_data() QTest::newRow("importNamespaceConflict") << "importNamespaceConflict.qml" << "importNamespaceConflict.errors.txt" << false; QTest::newRow("importVersionMissing (builtin)") << "importVersionMissingBuiltIn.qml" << "importVersionMissingBuiltIn.errors.txt" << false; QTest::newRow("importVersionMissing (installed)") << "importVersionMissingInstalled.qml" << "importVersionMissingInstalled.errors.txt" << false; + QTest::newRow("invalidImportID") << "invalidImportID.qml" << "invalidImportID.errors.txt" << false; + + QTest::newRow("signal.1") << "signal.1.qml" << "signal.1.errors.txt" << false; + QTest::newRow("signal.2") << "signal.2.qml" << "signal.2.errors.txt" << false; + QTest::newRow("signal.3") << "signal.3.qml" << "signal.3.errors.txt" << false; + + QTest::newRow("property.1") << "property.1.qml" << "property.1.errors.txt" << false; + QTest::newRow("property.2") << "property.2.qml" << "property.2.errors.txt" << false; + QTest::newRow("property.3") << "property.3.qml" << "property.3.errors.txt" << false; + QTest::newRow("property.4") << "property.4.qml" << "property.4.errors.txt" << false; + QTest::newRow("property.5") << "property.5.qml" << "property.5.errors.txt" << false; QTest::newRow("Script.1") << "script.1.qml" << "script.1.errors.txt" << false; QTest::newRow("Script.2") << "script.2.qml" << "script.2.errors.txt" << false; @@ -258,6 +269,7 @@ void tst_qmllanguage::errors_data() QTest::newRow("Script.9") << "script.9.qml" << "script.9.errors.txt" << false; QTest::newRow("Script.10") << "script.10.qml" << "script.10.errors.txt" << false; QTest::newRow("Script.11") << "script.11.qml" << "script.11.errors.txt" << false; + QTest::newRow("Script.12") << "script.12.qml" << "script.12.errors.txt" << false; QTest::newRow("Component.1") << "component.1.qml" << "component.1.errors.txt" << false; QTest::newRow("Component.2") << "component.2.qml" << "component.2.errors.txt" << false; @@ -270,6 +282,7 @@ void tst_qmllanguage::errors_data() QTest::newRow("defaultGrouped") << "defaultGrouped.qml" << "defaultGrouped.errors.txt" << false; QTest::newRow("emptySignal") << "emptySignal.qml" << "emptySignal.errors.txt" << false; QTest::newRow("doubleSignal") << "doubleSignal.qml" << "doubleSignal.errors.txt" << false; + QTest::newRow("invalidRoot") << "invalidRoot.qml" << "invalidRoot.errors.txt" << false; } void tst_qmllanguage::errors() |