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.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index aa76b8cd50..e970679c51 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -261,6 +261,7 @@ private slots:
void shadowedMethod();
void shadowedPrimitiveCmpEqNull();
void shadowingSingleton();
+ void sideEffectOnArgument();
void shifts();
void signalHandler();
void signalIndexMismatch();
@@ -5466,6 +5467,18 @@ void tst_QmlCppCodegen::shadowingSingleton()
QCOMPARE(o->objectName(), u"Hej"_s);
}
+void tst_QmlCppCodegen::sideEffectOnArgument()
+{
+ QQmlEngine e;
+ QQmlComponent c(&e, QUrl(u"qrc:/qt/qml/TestTypes/sideEffectOnArgument.qml"_s));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+
+ QTest::ignoreMessage(QtInfoMsg, "check ok");
+
+ QScopedPointer<QObject> o(c.create());
+ QVERIFY(!o.isNull());
+}
+
void tst_QmlCppCodegen::shifts()
{
QQmlEngine engine;