summaryrefslogtreecommitdiff
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.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index 5c511ef10c..7de1b4407d 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -3280,6 +3280,15 @@ void tst_QmlCppCodegen::sequenceToIterable()
QScopedPointer<QObject> object(component.create());
QVERIFY(!object.isNull());
QCOMPARE(object->property("c").toInt(), 11);
+
+ QQmlListReference children(object.data(), "children");
+ QCOMPARE(children.count(), 11);
+ static const QRegularExpression name("Entry\\(0x[0-9a-f]+, \"Item ([0-9])\"\\): ([0-9])");
+ for (int i = 0; i < 10; ++i) {
+ const auto match = name.match(children.at(i)->objectName());
+ QVERIFY(match.hasMatch());
+ QCOMPARE(match.captured(1), QString::number(i));
+ }
}
void tst_QmlCppCodegen::shadowedMethod()