summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-16 19:30:00 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-16 19:30:00 (GMT)
commit95d3bd3fc993d7c8c1fe92960c617a3392d87f66 (patch)
tree80fc13bd368c31c74d9b821155780f10081a380b /src/testlib
parent090827712933e587eb9308aabca49fc01a371f0e (diff)
parent90d398e5bef2a66ab944e1cc191c1ad6569e321a (diff)
downloadQt-95d3bd3fc993d7c8c1fe92960c617a3392d87f66.zip
Qt-95d3bd3fc993d7c8c1fe92960c617a3392d87f66.tar.gz
Qt-95d3bd3fc993d7c8c1fe92960c617a3392d87f66.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (201 commits) Fix an issue with the error signal in a callWithCallback not being Add skeleton changes file for 4.6.3. Fixed compiler warning about making the same class a friend twice New test cases for the QScriptString. Fix a deadlock in kqueue implementation of QFileSystemWatcher Don't crash when QTouchEvent is accepted but not handled by a QNAM HTTP: Unify socket EOF handling a bit doc: Added \section1 about serializing operators for Qt collections. Update the composition demo at 60 FPS instead of at painting rate Replace the inline blend function by #define Fix for using QContiguousCache with default constructor or capacity=0 Correctly mark QGraphicsScene::drawItems() as obsolete Compile fix on Mac with 10.5 sdk. QTestLib: don't crash if data tag requested, none available Implement the blend functions with SSE2 doc: Added some since version information. Ignore touch and gesture events when excluding input events Implemented GraphicsView Panel support for gestures. doc: Fixed several typos. Add MSVC-specific expected failures for JS test suite ...
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtestcase.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index ecdcca8..1c2db2f 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -1298,11 +1298,23 @@ static bool qInvokeTestMethod(const char *slotName, const char *data=0)
const int dataCount = table.dataCount();
QTestResult::setSkipCurrentTest(false);
+ // Data tag requested but none available?
+ if (data && !dataCount) {
+ // Let empty data tag through.
+ if (!*data)
+ data = 0;
+ else {
+ printf("Unknown testdata for function %s: '%s'\n", slotName, data);
+ printf("Function has no testdata.\n");
+ return false;
+ }
+ }
+
/* For each entry in the data table, do: */
do {
if (!data || !qstrcmp(data, table.testData(curDataIndex)->dataTag())) {
foundFunction = true;
- QTestDataSetter s(table.isEmpty() ? static_cast<QTestData *>(0)
+ QTestDataSetter s(curDataIndex >= dataCount ? static_cast<QTestData *>(0)
: table.testData(curDataIndex));
qInvokeTestMethodDataEntry(slot);