aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-01-26 00:34:21 +0100
committerLiang Qi <liang.qi@qt.io>2017-01-26 00:34:21 +0100
commit0076c44d3993f377ad6417d3bb08109b608dfbd2 (patch)
tree498a1f3d0997da8e3959e6a1d47071d56a6ce900 /tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
parent5f0eab2df3c82a71f70ea5a6535541fa786c6a78 (diff)
parent9aed949bb99b9bf328322457a02ad1a9fb330f2d (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts: src/quick/util/qquickutilmodule.cpp tools/qmllint/main.cpp Change-Id: Ic2283f88c293ca7fc776de3e83eb4c7812309d8a
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 8c0b0601fc..89dac33671 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -1412,7 +1412,6 @@ void tst_qqmlecmascript::signalParameterTypes()
QVERIFY(object != 0);
emit object->basicSignal();
- emit object->qjsValueEmittingSignal(QJSValue());
QCOMPARE(object->property("intProperty").toInt(), 10);
QCOMPARE(object->property("realProperty").toReal(), 19.2);
@@ -1421,6 +1420,12 @@ void tst_qqmlecmascript::signalParameterTypes()
QVERIFY(object->property("enumProperty") == MyQmlObject::EnumValue3);
QVERIFY(object->property("qtEnumProperty") == Qt::LeftButton);
+ emit object->qjsValueEmittingSignal(QJSValue());
+ QVERIFY(object->property("emittedQjsValueWasUndefined").toBool());
+ emit object->qjsValueEmittingSignal(QJSValue(42));
+ QVERIFY(!object->property("emittedQjsValueWasUndefined").toBool());
+ QCOMPARE(object->property("emittedQjsValueAsInt").value<int>(), 42);
+
delete object;
}