summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qmlecmascript/data/scriptErrors.qml3
-rw-r--r--tests/auto/declarative/qmlecmascript/testtypes.h1
-rw-r--r--tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp4
3 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/declarative/qmlecmascript/data/scriptErrors.qml b/tests/auto/declarative/qmlecmascript/data/scriptErrors.qml
index 9d99b41..5c8b1f8 100644
--- a/tests/auto/declarative/qmlecmascript/data/scriptErrors.qml
+++ b/tests/auto/declarative/qmlecmascript/data/scriptErrors.qml
@@ -10,6 +10,7 @@ MyQmlObject {
property int y: (a.value, undefinedObject)
onBasicSignal: { console.log(a.value); }
-
+ id: myObj
+ onAnotherBasicSignal: myObj.trueProperty = false;
}
diff --git a/tests/auto/declarative/qmlecmascript/testtypes.h b/tests/auto/declarative/qmlecmascript/testtypes.h
index d566681..d7f7d31 100644
--- a/tests/auto/declarative/qmlecmascript/testtypes.h
+++ b/tests/auto/declarative/qmlecmascript/testtypes.h
@@ -117,6 +117,7 @@ signals:
void argumentSignal(int a, QString b, qreal c);
void stringChanged();
void objectChanged();
+ void anotherBasicSignal();
public slots:
void deleteMe() { delete this; }
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();
}
/*