diff options
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index 673155119b..83a31b3f1c 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -108,6 +108,7 @@ private slots: void equalityTestsWithNullOrUndefined(); void equalityVarAndNonStorable(); void equalityVarAndStorable(); + void equalityVarWithOutConversion(); void equalsUndefined(); void evadingAmbiguity(); void exceptionFromInner(); @@ -1901,6 +1902,20 @@ void tst_QmlCppCodegen::equalityVarAndStorable() QMetaObject::invokeMethod(p.data(), "verify", 11); } +void tst_QmlCppCodegen::equalityVarWithOutConversion() +{ + QQmlEngine engine; + QUrl url(u"qrc:/qt/qml/TestTypes/equalityVarWithOutConversion.qml"_s); + QQmlComponent component(&engine, url); + QVERIFY2(!component.isError(), component.errorString().toUtf8()); + QScopedPointer<QObject> o(component.create()); + QVERIFY(!o.isNull()); + + auto ss = o->property("ss").value<QQmlScriptString>(); + QQmlExpression expr(ss); + expr.evaluate(); +} + void tst_QmlCppCodegen::equalsUndefined() { QQmlEngine engine; |
