Previously, the assertation triggered was rather unhelpful:
QFATAL : tst_QHash::qhash_qt4() ASSERT: "d->dataCount <
d->parent->elementCount()" in file qtestdata.cpp, line 88"
We now try a bit harder to be user-friendly.
Change-Id: I2e3a5ae27914d44fc1dc89af2a084e3d798fe221
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
QTEST_ASSERT_X(dataTag, "QTest::newRow()", "Data tag can not be null");
QTestTable *tbl = QTestTable::currentTestTable();
QTEST_ASSERT_X(tbl, "QTest::newRow()", "Cannot add testdata outside of a _data slot.");
+ QTEST_ASSERT_X(tbl->elementCount(), "QTest::newRow()", "Must add columns before attempting to add rows.");
return *tbl->newData(dataTag);
}