Make QTest::newRow a bit more verbose if a data tag is null.
Currently QTest::newRow function expects to have correct tag string for each test data. This was enforced by a simple assert. By adding a an assert with message we might simplify debugging of a test that generates test cases. Change-Id: I84ebb397264c99e7bb46d281fd38583dd2d6964c Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
This commit is contained in:
parent
f109f5b8a9
commit
2f90c4e40e
@ -2139,6 +2139,7 @@ void QTest::addColumnInternal(int id, const char *name)
|
||||
*/
|
||||
QTestData &QTest::newRow(const char *dataTag)
|
||||
{
|
||||
QTEST_ASSERT_X(dataTag, "QTest::newRow()", "Data tag can not be null");
|
||||
QTestTable *tbl = QTestTable::currentTestTable();
|
||||
QTEST_ASSERT_X(tbl, "QTest::addColumn()", "Cannot add testdata outside of a _data slot.");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user