summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11606.qml12
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp10
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11606.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11606.qml
new file mode 100644
index 0000000..6efb9c1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11606.qml
@@ -0,0 +1,12 @@
+import Qt 4.7
+
+QtObject {
+ property bool test: false
+ Component.onCompleted: {
+ try {
+ console.log(sorryNoSuchProperty);
+ } catch (e) {
+ test = true;
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index 50da55d..7e8a272 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -155,6 +155,7 @@ private slots:
void eval();
void function();
void qtbug_10696();
+ void qtbug_11606();
void include();
@@ -2503,6 +2504,15 @@ void tst_qdeclarativeecmascript::qtbug_10696()
delete o;
}
+void tst_qdeclarativeecmascript::qtbug_11606()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("qtbug_11606.qml"));
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+ QCOMPARE(o->property("test").toBool(), true);
+ delete o;
+}
+
QTEST_MAIN(tst_qdeclarativeecmascript)
#include "tst_qdeclarativeecmascript.moc"