aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
diff options
context:
space:
mode:
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 b8f12e772d..20f7940e9d 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -1410,7 +1410,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);
@@ -1419,6 +1418,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;
}