aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeecmascript/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/data')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml11
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.qml2
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scarceresources/scarceResourceFunctionFail.qml1
3 files changed, 11 insertions, 3 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml
index a778dcc8b6..0455271dac 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml
@@ -6,17 +6,24 @@ QtObject {
property int a
property variant b
+ property bool test1: false;
+ property bool test2: false;
+
Component.onCompleted: {
try {
root.a = undefined;
} catch(e) {
- console.log (e.fileName + ":" + e.lineNumber + ":" + e);
+ if (e.message == "Cannot assign [undefined] to int" &&
+ e.stack.indexOf("propertyAssignmentErrors.qml:14") != -1)
+ root.test1 = true;
}
try {
root.a = "Hello";
} catch(e) {
- console.log (e.fileName + ":" + e.lineNumber + ":" + e);
+ if (e.message == "Cannot assign QString to int" &&
+ e.stack.indexOf("propertyAssignmentErrors.qml:22") != -1)
+ root.test2 = true;
}
}
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.qml
index b7bb366698..7fcf2bebd7 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.qml
@@ -4,5 +4,5 @@ import "qtbug_11600.js" as Test
QtObject {
id: goo
- property bool test: undefined == goo.Test.foo
+ property bool test: undefined == goo.Test
}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scarceresources/scarceResourceFunctionFail.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scarceresources/scarceResourceFunctionFail.qml
index b1342fea90..9b07080054 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scarceresources/scarceResourceFunctionFail.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scarceresources/scarceResourceFunctionFail.qml
@@ -11,6 +11,7 @@ QtObject {
id: root
property MyScarceResourceObject a: MyScarceResourceObject { id: scarceResourceProvider }
property variant scarceResourceCopy;
+ property string srp_name: a.toString();
function retrieveScarceResource() {
root.scarceResourceCopy = scarceResourceProvider.scarceResource(); // common syntax error, should throw exception