diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-17 21:55:18 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-17 21:55:18 (GMT) |
commit | 9eacc56619ce471a9777f88c89f64ca95cd6ae63 (patch) | |
tree | b52b46a26a04889145a30339da28e5aa99756b1c /src/testlib | |
parent | fd3f9dd0f31efeea3aa0ec28b54c70d85712c7ba (diff) | |
parent | 54b20c491f7e182f6b98f65b7e9e8e68286d6109 (diff) | |
download | Qt-9eacc56619ce471a9777f88c89f64ca95cd6ae63.zip Qt-9eacc56619ce471a9777f88c89f64ca95cd6ae63.tar.gz Qt-9eacc56619ce471a9777f88c89f64ca95cd6ae63.tar.bz2 |
Merge branch 'qt-master-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-master-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (249 commits)
Fixed autotest failure in tst_QGraphicsScene::render on Maemo.
Changed function names in audio input example to clarify meaning
Tidied up debug output in audio input example
Removed redundant strings from audio input example
Cleaned up memory management in audio input example
Changed variable names in audio input example to match Qt code style
Made level calculation in audio input example work for all formats
Removed unused variable from audio input example
Update suspend/resume button label in audio input example
Changed function names in audio output example to clarify meaning
Cleaned up implementation of audio output example
Tidied up debug output in audio output example
Removed redundant strings from audio output example
Cleaned up memory management in audio output example
Changed variable names in audio output example to match Qt code style
Made data generation in audio output example work for all formats
Update suspend/resume button label in audio output example
Added missing override in audio output example
QLocalSocket::isValid on Windows must check for broken connection
Fix an issue with the error signal in a callWithCallback not being
...
Diffstat (limited to 'src/testlib')
-rw-r--r-- | src/testlib/qtestcase.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 40daecb..ca10b01 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -1123,6 +1123,14 @@ static void qParseArgs(int argc, char *argv[]) #endif } else if (strcmp(argv[i], "-qws") == 0) { // do nothing + } else if (strcmp(argv[i], "-graphicssystem") == 0) { + // do nothing + if (i + 1 >= argc) { + printf("-graphicssystem needs an extra parameter specifying the graphics system\n"); + exit(1); + } else { + ++i; + } } else if (argv[i][0] == '-') { printf("Unknown option: '%s'\n\n%s", argv[i], testOptions); exit(1); @@ -1308,11 +1316,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); |