Enhance tst_qmltc::componentTypes() by verifying that ids are correct
We can in fact check that the ids match to correct objects Pick-to: 6.3 Change-Id: I46ed1a3d0a9ef429670fdc0438a5d717971c459c Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
This commit is contained in:
parent
ebcdde7128
commit
feaed5f7aa
|
@ -582,6 +582,15 @@ void tst_qmltc::componentTypes()
|
|||
QScopedPointer<QObject> enclosed(normalComponent->create());
|
||||
QVERIFY(enclosed);
|
||||
QCOMPARE(enclosed->objectName(), u"enclosed"_qs);
|
||||
|
||||
QQmlListReference children(&created, "data");
|
||||
QCOMPARE(children.size(), 4);
|
||||
QCOMPARE(ctx->objectForName(u"normal"_qs), children.at(0));
|
||||
QCOMPARE(ctx->objectForName(u"accessibleNormal"_qs), children.at(1));
|
||||
QCOMPARE(ctx->objectForName(u"accessible"_qs), created.p2());
|
||||
QQuickTableView *table = qobject_cast<QQuickTableView *>(children.at(3));
|
||||
QVERIFY(table);
|
||||
QCOMPARE(ctx->objectForName(u"accessibleDelegate"_qs), table->delegate());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue