summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup corelib autotestsJason McDonald2011-11-0774-1398/+62
| | | | | | | Remove redundant empty constructors, destructors and test functions. Change-Id: Idb51368895e67ec3fc0345a9a5d33d77730c051b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Moved qobjectperformance into other/Jo Asplin2011-11-076-9/+2
| | | | | | | | | | | | | | | The qobjectperformance test is a kind of performance test that asserts that the time it takes to emit a signal to a certain number of receivers does not exceed a certain time. other/ currently seems to be a sensible place for such a test. Alternatively, it could have been put next to corelib/kernel/qobject/. Change-Id: I5c9461b62984f5806d1f6940123d30ef9f9f5a37 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Refer to v8 directly as a subdirectory.Jo Asplin2011-11-072-4/+1
| | | | | | | | v8 may be specified directly as a subdirectory in tests/auto/auto.pro instead of indirecly referring to v8.pro. Change-Id: I95d8c788fa67958372795519036cd8aec835b324 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Re-enabled passing tests in tst_qmenuJo Asplin2011-11-072-2/+2
| | | | | | | | | | | To increase the effective test coverage, this patch re-enables the tst_qmenu test case as such, and instead disables only the test functions that are currently failing in CI. Task-number: QTBUG-22453 Change-Id: I62cc1a2a9b0206595808deafb5fc137888ec97b3 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Re-enabled passing tests in tst_qinputcontextJo Asplin2011-11-072-2/+3
| | | | | | | | | | | To increase the effective test coverage, this patch re-enables the tst_qinputcontext test case as such, and instead disables only the test functions that are currently failing in CI. Task-number: QTBUG-22453 Change-Id: Ib1d4946ab29e67e0e72f4f9c6a7bf39b65d0f6be Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Re-enabled passing tests in tst_qprinterJo Asplin2011-11-072-1/+5
| | | | | | | | | | | To increase the effective test coverage, this patch re-enables the tst_qprinter test case as such, and instead disables only the test functions that are currently failing in CI. Task-number: QTBUG-22453 Change-Id: I74cc30dc26b8b83852b3516f8def995eab19cf0f Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* SSL certificate extensions: add unit testsRichard Moore2011-11-061-0/+89
| | | | | | | | Added tests for each of the supported extensions, and also for the handling of unknown ones. Change-Id: I29e0a5c1a411f41c2a554293662a33b56f205c00 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Support tentative commit string with input method.Pekka Vuorela2011-11-051-0/+26
| | | | | | | | | Tentative commit string allows input method to notify editor what is expected to be committed in the place of preedit. This commit adds such support in QLineEdit. Change-Id: If855619bc6843652db0d6254f7e7063bb8ad0936 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Moved qmetaobjectbuilder test into corelib/kernel/Jo Asplin2011-11-055-8/+2
| | | | | | | | This commit moves the qmetaobjectbuilder test from test/auto/ into corelib/kernel/ since that matches the location in the Qt source. Change-Id: I0342e8185ce775b0ef71849f365bf54c8fb56da4 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Remove unused PlatformQuirks functions.Jason McDonald2011-11-051-33/+0
| | | | | | | | These functions are no longer used anywhere in qtbase and are highly unlikely to be used elsewhere. Change-Id: I8e7c433c3b3e799ce0e5bc465182a5046275eb00 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Moved qobjectrace into integrationtests/Jo Asplin2011-11-055-1/+1
| | | | | | | | | | | The qobjectrace test seems to belong to integrationtests/ since it tests the interaction between QObject and QThread (much in the same way integrationtests/qsharedpointer_and_qwidget/ tests the interaction between QSharedPointer and QWidget). Change-Id: I89f1dab7300c2ef23755d52a86479677ef021ef1 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Moved tests into gui/kernel/ and gui/qopengl/Jo Asplin2011-11-0410-6/+6
| | | | | | | | | | | | | | This commit moves tests from test/auto/ into more appropriate locations (i.e. matching the locations in the Qt source): - qscreen and qwindow are moved into gui/kernel/ - qopengl is moved into gui/qopengl/ Note: qscreen is disabled for now since it is broken on Linux (see QTBUG-22554). Change-Id: Idcc7a51e78d6d0955bddb9cb4091866659193cc8 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Prevent timestamps in widgets' touch events from disappearingLaszlo Agocs2011-11-042-32/+41
| | | | | Change-Id: I096914eb2b02ad9c4a5c0462a1f4b76ef17c3957 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Added ref to bug report in qglthreads.proJo Asplin2011-11-041-1/+1
| | | | | Change-Id: Iecbda846eada49634b473959c642b8ee4c46c5c1 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Added -datatags option to QTestLibJo Asplin2011-11-049-1/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Note: This feature is ported from Qt 4.8. See the following commits: 01575deafb7d26ca2431374e92c6d71de96547c7 4866d1ba8afbab61e102942d1ea93b81fea053d6 ) Passing the -datatags option to a QTestLib program prints the available data tags to standard output. For completeness, the test case name is also printed at the start of each output line. (Although the file name is supposed to match the lower-case version of the test case name, this is currently not true in all cases (particularly not under tests/benchmarks/). Even if there was a script to enforce this convention, the -datatags option provides this information in a reliable way.) Data tags for each test function (f() in this case) are printed in four different ways depending on the presence of local and global data tags: Case 1: No tags: tst_MyTestCasetst_MyTestCase f Case 2: Local tags only: tst_MyTestCase f local tag 1 tst_MyTestCase f local tag 2 ... Case 3: Global tags only: tst_MyTestCase f __global__ global tag 1 tst_MyTestCase f __global__ global tag 2 ... Case 4: Local and global tags: tst_MyTestCase f local tag 1 __global__ global tag 1 tst_MyTestCase f local tag 2 __global__ global tag 1 ... tst_MyTestCase f local tag 1 __global__ global tag 2 tst_MyTestCase f local tag 2 __global__ global tag 2 ... ... Note that the string __global__ is assumed to be highly unlikely to occur in a data tag (if it does, an ambiguity results). Change-Id: Ib51aa0c3c32ad52e52ce519729292cf8f0ec5d50 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Re-enabled passing tests in tst_qvariantJo Asplin2011-11-042-2/+3
| | | | | | | | | | | To increase the effective test coverage, this patch re-enables the tst_qvariant test case as such, and instead disables only the test functions that are currently failing in CI. Task-number: QTBUG-22453 Change-Id: Ibf0dc3caf50d34084fa50cf76d199e77a42f6e16 Reviewed-by: Olivier Goffart <ogoffart@kde.org>
* test: Use QWidget::grab() instead of QPixmap::grabWidget()Sergio Ahumada2011-11-041-3/+3
| | | | | | | | | Removing warnings from the test function as QPixmap::grabWidget() is being deprecated. Change-Id: I26ad1e9def0bebe8e4ee997068ba593245d0cd05 Reviewed-by: Jo Asplin <jo.asplin@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QStandardPaths: add DownloadLocation.David Faure2011-11-041-0/+1
| | | | | | | | | Only properly implemented on unix (XDG), falls back to Document location on Mac and Windows, because not easily available with the current API being used by either one. Change-Id: Id269f0e3c4e3a68e19205de96c0b39980fde80ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix tst_qstandardpaths: Mac OSX is a unix, but doesn't use XDG.David Faure2011-11-041-5/+9
| | | | | Change-Id: I2b4552a162dc9f993e0587ace6e7e3fb4f96571e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Re-enabled passing test in tst_qdbuspendingcallSergio Ahumada2011-11-041-2/+0
| | | | | | | | | tst_QDBusPendingCall::watcher_waitForFinished_threaded() autotest was fixed by faa6113c41b81368c5bbc2a764c2ae9bbc42e415 Task-number: QTBUG-20859 Change-Id: I05aaebfde45862836b10700aa7d9c64e4287466f Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Don't rely on PlatformQuirks in qimagereader testJason McDonald2011-11-041-6/+3
| | | | | | | | | | | | | | The PlatformQuirks header is, by its author's own admission, based on "very bad assumptions", those being that only Meego has quirks. The assumption that only Meego has versions of libjpeg and libpng with rounding errors is not a good assumption. Change the test to be a little tolerant of rounding error regardless of the platform, at least until there's a reliable way to tell which libjpeg/libpng versions have rounding errors. Change-Id: Id2be5cc54739249b615bf3307ee1850c0a5c06b3 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Do not put cursor at non-stop character positionsJiang Jiang2011-11-041-2/+17
| | | | | | | | | | | When moving cursors, non-stop positions are skipped, however certain input sequences can still lead us there. In such cases we should simply ignore those positions in cursorToX. Task-number: QTBUG-7076 Change-Id: Ia0a25931f4043359f72a6c0c14a74b905e40b93e Reviewed-by: Eskil Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Re-enabled passing tests in tst_qlistviewJo Asplin2011-11-042-2/+1
| | | | | | | | | | | To increase the effective test coverage, this patch re-enables the tst_qlistview test case as such, and instead disables only the test functions that are currently failing in CI. Task-number: QTBUG-22453 Change-Id: I029be60c16cdff5ee3e38889d2780f1ee7d01b51 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* QtGui: Fix compilation with gcc 4.4Friedemann Kleint2011-11-031-36/+36
| | | | | | | | | | | | - Do not mix QStringLiteral and Q_TR_NOOP. - Replace static QString member variables by - static member functions to return the strings. - Use tr() since QAccessibleActionInterface declares it. Acked-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Change-Id: Iabbee8ef61a5d7bfd35978a3f1cce1866329d065 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* test: Skipping tst_qmdisubwindow::setFont() as it's unstableSergio Ahumada2011-11-031-0/+1
| | | | | | | | | This unstable test is preventing some good changes from being merged. Further investigation needs to follow, so people can refer to QTBUG-22544 for a real fix. Change-Id: I038e5f340ccd2562d0e67428af595a2bcfc8c11d Reviewed-by: Olivier Goffart <ogoffart@kde.org>
* Fix unstable test due to a race in QThreadBradley T. Hughes2011-11-031-1/+1
| | | | | | | | | | | | | QThread::finished() is emitted before setting the thread's state to finished and !running, which means it's possible to receive the finished() signal and act on it while QThread::isRunning() still returns true. This test randomly fails due to this race. Fix it by using checking the return value of QThread::wait() instead. Change-Id: Ibf347fc9a2e8d32b328227ee6978e1129dd781f4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QThread::isFinished should return true from finished()Olivier Goffart2011-11-031-0/+34
| | | | | | | | | | | | | | | | | | | and isRunning() should return false. This restore the Qt 4.7 behaviour In Qt 4.7, the finished() was called with the thread's intenal mutex locked. Which mean that: - Call to isRunning or isFinished called from a slot connected to finish within the thread would deadlock. (Hence no compatibility to keep here) - Call to isRunning or isFinished from a slot connected with QueuedConnection in another thread would lock the mutex until the destructors are finished. and then return as if the thread have finished. Change-Id: I963eccae8f7634aff90cc4bbab6ca886a78e35eb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove empty functions from QDirModel test.Jason McDonald2011-11-031-27/+0
| | | | | Change-Id: Ieb8af41425739f9175df26224b171cd9f8b3c4f3 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Improve QDirModel autotestJason McDonald2011-11-031-5/+25
| | | | | | | | | | The unreadable() test function has been disabled since before the tests were imported into the Qt repository. The idea of the test seems valid (though the original implementation failed to correctly create an unreadable file), so it should be re-enabled. Change-Id: I94634bc5785dfbfbb42ca975badaead7fe812b29 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Allow extra selftests without modifying source.Jason McDonald2011-11-031-7/+10
| | | | | Change-Id: I21708b725611eb64bdb0414cee08ca00dd62b213 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Get rid of "#if 0" and skipped tests in QPainter autotest.Samuel Rødal2011-11-031-271/+0
| | | | | | | | | | | | | qt_format_text_clip() and qt_format_text_boundingrect() have been skipped ever since they were originally added to git, so I see no point in keeping them. The #if 0 in setEqualClipRegionAndPath() was ifdefed out from when that specific test case was added (maybe it was failing to begin with?), but it passes now, so we should enable it. Change-Id: I6551e3b5612a4d4b00a969511af6abc85db43892 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Re-enabled passing tests in tst_qgraphicsitemJo Asplin2011-11-022-3/+1
| | | | | | | | | | | To increase the effective test coverage, this patch re-enables the tst_qgraphicsitem test case as such, and instead disables only the test functions that are currently failing in CI. Task-number: QTBUG-22453 Change-Id: If311bc61801d2a279c274928ae7f0faeb595eeb3 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Re-enabled passing tests in tst_qgraphicsviewJo Asplin2011-11-022-3/+2
| | | | | | | | | | | To increase the effective test coverage, this patch re-enables the tst_qgraphicsview test case as such, and instead disables only the test functions that are currently failing in CI. Task-number: QTBUG-22453 Change-Id: I6b8eb09000ece789b990a2dd697cdb8b47cc8e1c Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Re-enabled passing tests in tst_qgraphicssceneJo Asplin2011-11-022-3/+1
| | | | | | | | | | | To increase the effective test coverage, this patch re-enables the tst_qgraphicsscene test case as such, and instead disables only the test functions that are currently failing in CI. Task-number: QTBUG-22453 Change-Id: Idd229532787ce8138d8e1c86daf1f91b90e87e38 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Moved tests into network/ssl/Jo Asplin2011-11-025-4/+5
| | | | | | | | | | This commit moves qsslsocket_onDemandCertificates_member and qsslsocket_onDemandCertificates_static from tests/auto/ to tests/auto/network/ssl/. Change-Id: I1593e113016ce7bb7dffbee82f1196275784d0ac Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Use C++11 static_assertOlivier Goffart2011-11-021-0/+17
| | | | | | | Change-Id: I75aa2bc209cdc8869e7daa9fd0dd865ccf65a68e Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@kde.org>
* Reinstate disabled part of qsortfilterproxymodel testJason McDonald2011-11-021-3/+1
| | | | | | | | | This test function has been disabled since before the tests were imported into the Qt repository in 2006, but seems to pass today, at least on Linux. Change-Id: I8ff90a11a0fbb260d66b20ae735b5f21c450a5af Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove stale test data from qsortfilterproxymodel testJason McDonald2011-11-021-43/+0
| | | | | | | | | The removed test data has been disabled since before the tests were added to the Qt repository in June 2006, and was incomplete (the "pattern" field was missing). Change-Id: I974d03a4dcca76ba1a20f740372702612c8ce02b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove disabled code from QWidget autotest.Jason McDonald2011-11-021-11/+0
| | | | | | | | The removed code was already disabled when first committed in January 2009. Change-Id: I00a82f2e673fee76869cc76d756c36d081da2d2a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove disabled code from qgridlayout autotestJason McDonald2011-11-021-10/+0
| | | | | | | | The removed code was already disabled when it was first added in June 2006, and is based on assumptions that no longer hold true. Change-Id: Id7941d46e2a993aac422554dcc5540eb64eac492 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove disabled test data from QUrl autotestJason McDonald2011-11-021-6/+0
| | | | | | | | The removed test data was for obex URLs, which are not supported by QUrl. Change-Id: I166130ae936342d415165e46b7943d198de8986b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove redundant #if 1 from qdbusmarshall testJason McDonald2011-11-021-2/+0
| | | | | Change-Id: I5342210cda1f02950667621e5e64d65d6357c6ce Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove redundant code from qsortfilterproxymodel testJason McDonald2011-11-021-4/+1
| | | | | | | | | Remove a couple of "#if 1" directives (but not their contents), which have been present since before the tests were imported into the Qt repository in 2006. Change-Id: Id43aff37843e7a44ed96973f809de3838ba0e5b9 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Improve QWidget autotest.Jason McDonald2011-11-021-5/+0
| | | | | | | Remove some "#if 1" directives and a line of debug code. Change-Id: Ib34f5b65470a24ee499799525ffe0645ccc117fe Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove debugging code from qgraphicsitem autotest.Jason McDonald2011-11-021-6/+0
| | | | | Change-Id: Ia2ff65b5e980b42c5c64b957143860e94395d54f Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove unused code from qdbusmarshall test.Jason McDonald2011-11-021-32/+0
| | | | | | | | The removed functions have been unsued since at least as far back as 2006. Change-Id: Id1ea77dbfffa319c18891968f3aa378cfb563fd4 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete code from qdbusmarshall test.Jason McDonald2011-11-021-6/+0
| | | | | | | | The removed code had been disabled since 2007 and tested functionality that was no longer supported. Change-Id: I49dfe58601c1cc6d41590ab2980daba27eca6bfb Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete code from qdbuspendingcall testJason McDonald2011-11-021-33/+0
| | | | | | | The tested functionality hasn't been in the public API since 2008. Change-Id: I2898da3730fa6248eea2e19779b33ccc793b7a31 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove disabled code in QItemView test.Jason McDonald2011-11-021-56/+0
| | | | | | | | | | The removed code was disabled in January 2007. The commit history does not make clear what the code was supposed to achieve and the code doesn't do what the comment at the top says (that looks like a TODO). Best to delete it and start again. Change-Id: I42b6b1d865c96518d74dc189a4a41d0d2776e5bc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove test that hasn't been enabled since 2007.Casper van Donderen2011-11-011-69/+0
| | | | | | | Task-number: QTBUG-22444 Change-Id: Id7569cf60cb314511a7d4f38833913c442f3fbba Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>