summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-12-11 01:39:11 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-12-11 01:39:11 (GMT)
commit8cda26604462a4941818b7c9574851d9a07acebf (patch)
tree7dff3f725ce8efabb4418568d1e56d0b6db0cf8f /tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
parentcf01cfb8275c785d21eb5867c968cac1f54d296e (diff)
downloadQt-8cda26604462a4941818b7c9574851d9a07acebf.zip
Qt-8cda26604462a4941818b7c9574851d9a07acebf.tar.gz
Qt-8cda26604462a4941818b7c9574851d9a07acebf.tar.bz2
Throw error when attempting to write to a read-only property via script.
Diffstat (limited to 'tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp')
-rw-r--r--tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
index c3c7977..30ecc51 100644
--- a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
+++ b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
@@ -830,6 +830,7 @@ void tst_qmlecmascript::scriptErrors()
QString warning4 = url + ":12: TypeError: Result of expression 'a' [undefined] is not an object.";
QString warning5 = url + ":10: TypeError: Result of expression 'a' [undefined] is not an object.";
QString warning6 = url + ":9: Unable to assign [undefined] to int";
+ QString warning7 = url + ":14: Error: Cannot assign to read-only property \"trueProperty\"";
QTest::ignoreMessage(QtWarningMsg, warning1.toLatin1().constData());
QTest::ignoreMessage(QtWarningMsg, warning2.toLatin1().constData());
@@ -841,6 +842,9 @@ void tst_qmlecmascript::scriptErrors()
QTest::ignoreMessage(QtWarningMsg, warning4.toLatin1().constData());
emit object->basicSignal();
+
+ QTest::ignoreMessage(QtWarningMsg, warning7.toLatin1().constData());
+ emit object->anotherBasicSignal();
}
/*