diff options
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index 02411f8b9a..e885e403ac 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -129,6 +129,7 @@ private slots: void typedArray(); void prefixedMetaType(); void evadingAmbiguity(); + void fromBoolValue(); }; void tst_QmlCppCodegen::simpleBinding() @@ -1982,6 +1983,17 @@ void tst_QmlCppCodegen::evadingAmbiguity() QCOMPARE(o2->property("i").toString(), QStringLiteral("Ambiguous2")); } +void tst_QmlCppCodegen::fromBoolValue() +{ + QQmlEngine engine; + QQmlComponent c(&engine, QUrl(u"qrc:/TestTypes/fromBoolValue.qml"_qs)); + QVERIFY2(c.isReady(), qPrintable(c.errorString())); + QScopedPointer<QObject> o(c.create()); + QCOMPARE(o->property("a").toBool(), true); + o->setProperty("x", 100); + QCOMPARE(o->property("a").toBool(), false); +} + void tst_QmlCppCodegen::runInterpreted() { #ifdef Q_OS_ANDROID |
