summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativelanguage
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-06-25 03:11:09 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-06-25 03:11:09 (GMT)
commit2426502f372f1c1a33ccaba3549dc0eda2a754de (patch)
tree8a9ec929e44395703bdb15d290ce170e69f800ab /tests/auto/declarative/qdeclarativelanguage
parentcfa9eee32081dc49ab0697b1f483db01c8aee7cd (diff)
downloadQt-2426502f372f1c1a33ccaba3549dc0eda2a754de.zip
Qt-2426502f372f1c1a33ccaba3549dc0eda2a754de.tar.gz
Qt-2426502f372f1c1a33ccaba3549dc0eda2a754de.tar.bz2
Disallow global object properties as property names
QTBUG-11605
Diffstat (limited to 'tests/auto/declarative/qdeclarativelanguage')
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidProperty.errors.txt1
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/invalidProperty.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp1
3 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidProperty.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidProperty.errors.txt
new file mode 100644
index 0000000..c83e5ae
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidProperty.errors.txt
@@ -0,0 +1 @@
+4:5:Illegal property name
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidProperty.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidProperty.qml
new file mode 100644
index 0000000..6077de4
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidProperty.qml
@@ -0,0 +1,5 @@
+import Qt 4.7
+
+QtObject {
+ property int parseInt
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index 413843a..3ce356e 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -370,6 +370,7 @@ void tst_qdeclarativelanguage::errors_data()
QTest::newRow("destroyedSignal") << "destroyedSignal.qml" << "destroyedSignal.errors.txt" << false;
QTest::newRow("assignToNamespace") << "assignToNamespace.qml" << "assignToNamespace.errors.txt" << false;
QTest::newRow("invalidOn") << "invalidOn.qml" << "invalidOn.errors.txt" << false;
+ QTest::newRow("invalidProperty") << "invalidProperty.qml" << "invalidProperty.errors.txt" << false;
}