aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
-rw-r--r--tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index 00c00b4c0f..39292d9dd8 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -184,6 +184,7 @@ private slots:
void mathMinMax();
void mathOperations();
void mathStaticProperties();
+ void mergeSideEffects();
void mergedObjectReadWrite();
void methodOnListLookup();
void methods();
@@ -3712,6 +3713,16 @@ void tst_QmlCppCodegen::mathStaticProperties()
QCOMPARE(object->property("sqrt2").toDouble(), 1.4142135623730951);
}
+void tst_QmlCppCodegen::mergeSideEffects()
+{
+ QQmlEngine engine;
+ QQmlComponent c(&engine, QUrl(u"qrc:/qt/qml/TestTypes/mergeSideEffects.qml"_s));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> o(c.create());
+ QVERIFY(!o.isNull());
+ QCOMPARE(o->property("c").toInt(), 3);
+}
+
void tst_QmlCppCodegen::mergedObjectReadWrite()
{
QQmlEngine e;