summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@collabora.com>2012-01-27 14:41:24 +0200
committerQt by Nokia <qt-info@nokia.com>2012-01-31 04:55:02 +0100
commite24021691ffffbd9cda91340fc2e8d5dcfd88d24 (patch)
treefd8f67436b3240cbceddbb1ac022b9735bb74816 /src/testlib
parent8f6ee81ee97bd89df9bbc6d4353df05542c3ac64 (diff)
Revert "Revert "Blow up earlier when adding test rows without columns.""
The problem in qmltest has now been fixed by adding a dummy column, so this should be good to re-add. See qtdeclarative change id I1bfed663fa7b58d71e0cf898db6bd8ae61dae46b. This reverts commit 963958b4f62513cbc76fb06920de80f7f906f523. Task-number: QTBUG-23845 Change-Id: I4b6755d3ea97a4624480cc008d280fc8e33743a6 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtestcase.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index e2b01ae040..8a1d4bf44a 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -2286,6 +2286,7 @@ 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::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);
}