Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5
-
None
Description
I want to test every model in my application during integration testing, so I do this in initTestCase():
auto models = window->findChildren<QAbstractItemModel*>(); for (const auto model : models) new QAbstractItemModelTester(model);
The problem is that if QAbstractItemModelTester sees an issue and causes a test failure, I have no idea which model is at fault:
FAIL! : tst_Stuff::initTestCase() 'model->hasChildren(topIndex)' returned FALSE. () Loc: [/Users/mitch/dev/qt-dev/qtbase/src/testlib/qabstractitemmodeltester.cpp(409)] FAIL! : tst_Stuff::initTestCase() Compared values are not the same Actual (model->parent(childIndex)): QModelIndex(-1,-1,0x0,0x0) Expected (topIndex) : QModelIndex(0,0,0x0,0x137361d40) Loc: [/Users/mitch/dev/qt-dev/qtbase/src/testlib/qabstractitemmodeltester.cpp(503)]
It should identify the model in the failure message.