diff options
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 36ccbe0558..0f6d0b035d 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -312,6 +312,7 @@ private slots: void qtbug_34493(); void singletonFromQMLToCpp(); void setPropertyOnInvalid(); + void miscTypeTest(); private: // static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter); @@ -7383,6 +7384,29 @@ void tst_qqmlecmascript::setPropertyOnInvalid() } } +void tst_qqmlecmascript::miscTypeTest() +{ + QQmlComponent component(&engine, testFileUrl("misctypetest.qml")); + + QObject *object = component.create(); + if (object == 0) + qDebug() << component.errorString(); + QVERIFY(object != 0); + + QVariant q; + QMetaObject::invokeMethod(object, "test_invalid_url_equal", Q_RETURN_ARG(QVariant, q)); + QVERIFY(q.toBool() == true); + QMetaObject::invokeMethod(object, "test_invalid_url_strictequal", Q_RETURN_ARG(QVariant, q)); + QVERIFY(q.toBool() == true); + QMetaObject::invokeMethod(object, "test_valid_url_equal", Q_RETURN_ARG(QVariant, q)); + QVERIFY(q.toBool() == true); + QMetaObject::invokeMethod(object, "test_valid_url_strictequal", Q_RETURN_ARG(QVariant, q)); + QVERIFY(q.toBool() == true); + + delete object; + +} + QTEST_MAIN(tst_qqmlecmascript) #include "tst_qqmlecmascript.moc" |