summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Re-enable the xml autotests on Mac OS XBradley T. Hughes2011-11-211-1/+0
| | | | | | | All tests pass. Change-Id: I864b12c1045db1b2a25bd8a22635d42d55e5f0de Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Re-enable the dbus autotests on Mac OS XBradley T. Hughes2011-11-211-1/+0
| | | | | | | | These tests aren't actually enabled due to the lack of dbus, but there's no reason to explicitly disable the check target because of it. Change-Id: I685008060c8e8d713cd27e7684cf3d474c0cf55d Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Re-enable the testlib autotests on Mac OS XBradley T. Hughes2011-11-211-1/+0
| | | | | | | All tests pass. Change-Id: If6fa41826299bfc9f712d66df85920f01c3bdef4 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Re-enable the 'other' autotests on Mac OS XBradley T. Hughes2011-11-211-1/+0
| | | | | | | All tests pass. Change-Id: I920ef758e0b967a7ba7548e79132a1fbb3cc27c5 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Re-enable the tools autotests on Mac OS XBradley T. Hughes2011-11-211-1/+0
| | | | | | | All tests pass. Change-Id: I361a0a70ca2993a0ea3bf690c3c97743ec6f5831 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Re-enable the integrationtests autotests on Mac OS XBradley T. Hughes2011-11-215-1/+5
| | | | | | | | | | | | | | The tst_MacNativeEvents, tst_QAccessibility, and tst_QFocusEvent tests currently fail, which will block any changes that attempt to re-enable the autotests. Ignore the failures for now by marking the tests as insignificant. The tst_Lancelot for currently crashes, which can destabilize the CI system when attempting to re-enable the autotests. Skip this test for now by disabling the check target for it. Change-Id: Icc1dc77ebb9b7be746606aae04c9abf2480d0c3f Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Re-enable the corelib autotests on Mac OS XBradley T. Hughes2011-11-2111-3/+34
| | | | | | | | | | | | | | | | | | | This is the first change to re-enable the autotests for the individual qtbase modules. This means adding subdir.CONFIG=no_check_target for each module (except corelib) in tests/auto/auto.pro instead of in tests/tests.pro QFileSystemWatcher, QIODeice, QSettings, QTextStream, QSocketNotifier, QVariant, QPluginLoader, QLocale: These tests currently fail, which will block any changes that attempt to re-enable the autotests. Ignore the failures for now by marking them as insignificant. QAbstractItemModel: This test currently crashes, which can destabilize the CI system when attempting to re-enable the autotests. Skip this test for now by disabling the check target for it. Change-Id: Ie5147d5c5cfae5e7d0a495d5c4788ce92fe2e6d8 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* qtbase tests: Fix some warningsFriedemann Kleint2011-11-2128-93/+63
| | | | | | | | - Fix warnings about QAtomicPointer/Int usage - Fix some gcc 4.6 warnings about assigned/unused variables Change-Id: Ib4dbf9110f0dad93ad48e97278310f05fad3a82a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete code from QRect test.Jason McDonald2011-11-211-126/+0
| | | | | | | | The removed code has been commented-out since Qt 4.0 and relates to QCOORD, which was part of Qt3Support and has thus been removed from Qt5. Change-Id: I4651738d505234abe9b79ef5045c55cbf132a88e Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove empty functions from QLocale test.Jason McDonald2011-11-211-10/+0
| | | | | | | | These functions have been commented-out and empty for more than five years. Change-Id: I52d6dc0366cd8eae8701b05e4c66e9911bf7e8f7 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Restore commented-out code in QHash test.Jason McDonald2011-11-211-1/+1
| | | | | | | | | | | | | | The restored code verifies the following statement in the documentation of QHash::find(): "If the hash contains no item with the key, the function returns end()." It is not clear why the code was commented-out in the first place, as this occurred before the tests were imported into the Qt repository in 2006. Change-Id: I745393a8e3e728fc60009da07abd038a3d56e99c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Restore commented-out code in QByteArray test.Jason McDonald2011-11-211-3/+3
| | | | | | | | | The restored code was inexplicably commented-out by commit d57aec33 (non-public history), which was only supposed to be changing upper-case booleans to lower-case. Change-Id: I1581fc89511f600c614871e1aec6bc030cddf40e Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* tst_qsslsocket: improve failure messageRohan McGovern2011-11-211-1/+1
| | | | | | | | | Cast enum to int so that we get the actual and expected values in the failure message, rather than merely "Compared values are not the same". Change-Id: Idc20e050c2e8a07d70f839c0a45044b070c0900e Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Remove obsolete code from QStateMachine test.Jason McDonald2011-11-211-366/+0
| | | | | | | | | The removed code was already disabled because it tested API that never made it into an official Qt release -- see commit f7d69d75 in the Qt 4.x history. Change-Id: I4f7eb20f937bdabfcac92842c5804233dca26a23 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete code from QStateMachine test.Jason McDonald2011-11-211-245/+0
| | | | | | | | | The removed code was already disabled because it tested API that never made into an official Qt release -- see commit ad1441fc in the Qt 4.x history. Change-Id: I7dbfb83c82bdb79e8d3f7f6c7043d76913dea589 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* tst_qsslsocket: don't run SSLv2 tests when SSLv2 has been disabledRohan McGovern2011-11-211-0/+16
| | | | | | | | | SSLv2 may be disabled in openssl at compile time. If so, do not attempt to test it. Change-Id: I189c8fde5b5dc8e739d54cc1adde1d3e3e217391 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Improve diagnostics of QPluginLoader test.Jason McDonald2011-11-181-4/+4
| | | | | | | | Use QVERIFY2 so that the test output shows the full error string when it does not contain the expected sub-string. Change-Id: I31f91bd5c47c082aacabd2333bc12137bc4d24a6 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix indentation of QPluginLoader test.Jason McDonald2011-11-181-21/+21
| | | | | Change-Id: I4c6957d2a67ac387232226098b4490e3d5a86d51 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Improve QPluginLoader autotest diagnostics.Jason McDonald2011-11-181-53/+16
| | | | | | | | | | | Previously, the user had to recompile the test with an additional define to see the plugin loader error string. By re-ordering the verification statements, we can ensure that the error string is visible in the test results whenever its value is not the expected value, thus eliminating the need for conditional diagnostics. Change-Id: Iae9ef0b7cbad551fd56f0e0439eaad034f2420e3 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove disabled code from QLibrary autotestJason McDonald2011-11-181-5/+0
| | | | | | | | | | The removed code was already commented-out when it was first added in 2007, and would not form a useful test as it was not followed by any verification steps. QLibrary::setLoadHints() is tested elsewhere, so this code can vanish. Change-Id: I1c4dcaacaf31b0f38136336414cfbe3de1a406f3 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove disabled test data from QVariant test.Jason McDonald2011-11-181-4/+0
| | | | | | | | The removed data duplicated the first row of test data in the same function. Change-Id: I5d55b970d072d58c170b3ed3004c1661c6d0d13c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete code from QVariant test.Jason McDonald2011-11-181-2/+0
| | | | | Change-Id: If609ddbef7002cb48f4459efd8f2c6edb02c8677 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete code from QTimer test.Jason McDonald2011-11-181-5/+2
| | | | | | | | The removed code was for Windows versions <= 2000, which are not supported by Qt5. Change-Id: I779ffb8427035b7eb97d8d0af403d03065bc779c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Change confusing test function name.Jason McDonald2011-11-181-2/+2
| | | | | | | | | | | Naming a test function "_data" is potentially confusing as that string is a suffix reserved for functions that create data tables for data-driven tests. Presumably this function was accidentally caught in a search and replace at some point before the tests were imported into the Qt repository in 2006. Change-Id: I451c0400a1580233ee90b75dd5ad489ee3d3788e Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix typo in QUrl autotest.Jason McDonald2011-11-181-3/+3
| | | | | Change-Id: Id85ad5c16e3a5b7a1614affa041d19f5062073fd Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete test data from QFile test.Jason McDonald2011-11-181-1/+0
| | | | | | | | | | | The removed data relied on the test's own source file having no write permissions, but that is not a valid assumption -- in a source package the file wouldn't have had write permissions, in Perforce it would have depended on whether the file had been checked-out for editing and in git the file would always have write permission. Change-Id: I3b6100429120137095a210189961c8b97f06e50a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete test data from QFileInfo test.Jason McDonald2011-11-181-1/+0
| | | | | | | | | | | The removed data relied on the test's own source file having no write permissions, but that is not a valid assumption -- in a source package the file wouldn't have had write permissions, in Perforce it would have depended on whether the file had been checked-out for editing and in git the file would always have write permission. Change-Id: I000596f122f2765f97a09a08074938c90e2e9f95 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete comment from QDataStream test.Jason McDonald2011-11-181-6/+0
| | | | | | | | | The removed comment was introduced before the tests were imported into the Qt repository in 2006 and seems to relate to a test failure that no longer occurs. Change-Id: I01f372f6a4f48110711f4f2a86e73acfb7134e24 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete comment from QDataStream test.Jason McDonald2011-11-181-3/+0
| | | | | | | | | The removed comment was introduced before the tests were imported into the Qt repository in 2006 and seems to relate to code that no longer exists. Change-Id: Ic21e46fe0157adf5be9dc62de098517b7b27c310 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Improve QBuffer autotest.Jason McDonald2011-11-181-16/+43
| | | | | | | | | | | | | | | | | | | | This commit fixes several issues found in the readLineBoundaries() test function. First, the test performed some test actions but did not perform any verification steps to check that the outcome of those actions was acceptable. Second, the test didn't need to write the buffered data to a file to verify line-by-line reading. Third, the get/unget action was unrelated to the readLineBoundaries() test and has been moved to a separate test function. That test function now tests that get/unget works at every position in a buffer, not just at position 0. Change-Id: Icad52ed598e94b6e05a194b9ab301d099bfc094c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Don't depend on moc to disable test functions.Jason McDonald2011-11-1863-855/+854
| | | | | | | | | | | | | | | | | | | | | The moc tool is not aware of all defines (particularly those that are compiler builtins) and does not correctly evaluate others that depend on compiler builtins, such as Q_OS_FOO. This commit reverts parts of the following commits, but is not a complete fix as there were many instances of this problem in the tests prior to those commits: 924d810dbdcd5b5b0fa860922b2487ea9062d002 8aaff6751038b88d17e23be6fcee945771297c5b 338d3f11973412047c2c9cd41cbd0c961d738ef3 a55034062ba2bf73a9f1ed3d9cf31745b38149e3 253497b7446c7d723aa3bdd7152e25d6852f2604 7cfad460c56319ba89c4a3a0bbcb2e54ab1cdbc6 9d2ff58f3642828e494e7e9b2df7dbb8e2cd408f 0cf6baa2d61ebaad2a2a0530c37f27e719b68f4b Change-Id: I947d797fe3ec76139ba1b55561cea569895662c5 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fixed compile of autotests with -qtnamespace.Rohan McGovern2011-11-182-2/+4
| | | | | | | Make sure to use the Qt namespace for qGlobalPostedEventsCount. Change-Id: I558a0b0fba1e22a2edd96f9499a2bab82046c4a4 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Call invalidateResource() on QOpenGLMultiGroupSharedResource-owned resourcesKent Hansen2011-11-171-3/+36
| | | | | | | | | Commit 202127f860208c21145e05685bc54219e1655dbd ensured that QOpenGLMultiGroupSharedResource-owned resources are deleted, but it was missing a call to invalidateResource(). Change-Id: I166ce8a7298772408081331fe1a91bd2cd88aebb Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Improve the testability of QSslOptions.Richard Moore2011-11-171-0/+43
| | | | | | | | | | The handling of QSslOptions is complicated not only by the subject, but also by the fact that some of the openssl directives are negatives. This commit tries to separate the inherent complexity from the complexity of the api by allowing us to test them independently. Change-Id: Ieb9386c69dd9b0b49dc42e26b2878a301f26ded1 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Remove commented code from QBuffer autotest.Jason McDonald2011-11-171-3/+0
| | | | | | | | | The removed code was commented-out before the tests were imported into the Qt repository in June 2006. This code is no longer valid as the warning messages it relates to are not produced by any code in qtbase. Change-Id: Iac63b27387b51a71c567386ca61faf5fb00c3364 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Improve Q_FUNC_INFO autotest.Jason McDonald2011-11-171-7/+6
| | | | | | | | | | | | | | The availableWithoutDebug() test was trying to force QT_NO_DEBUG to be defined, but was actually doing the opposite. While I'm not satisfied with the way this test works (it would be better to test with QT_NO_DEBUG already defined when Q_FUNC_INFO is included). at least this test now does what it says it does. Additionally, the test has been improved by checking that Q_FUNC_INFO returns a non-empty string, as opposed to just compiling. Change-Id: I9175e3a7406152b6250b507a61b5062e3cfabeb8 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Build all tests on Mac OS X, but do not run them yet.Bradley T. Hughes2011-11-171-2/+3
| | | | | | | | | | | | | | Previously, autotests and benchmarks were disabled on Mac OS X. This is wrong, and needs to be corrected. The 'make check' target is disabled for the autotests on Mac OS X for now, but all tests will now be built. The check target does not actually run the benchmarks, so this can be safely re-enabled without breaking the CI system. There will be commits to follow which re-enable the 'make check' target on Mac OS X for each module. Change-Id: I1347da46e3688b48e8cc5d933ee5188ea3723639 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* SSL namespace: rename TlsV1 to TlsV1_0Peter Hartmann2011-11-162-20/+20
| | | | | | | | | | | | This is a source-incompatible change. TlsV1 is ambiguous; what is actually meant is TLS version 1.0. There are also TLS versions 1.1 and 1.2; we might want to add options for these once OpenSSL supports them (apparently they will be with OpenSSL version 1.0.1). Change-Id: I940d020b181b5fa528788ef0c3c47e8ef873796a Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove warnings from deprecated atomic operators in autotestsBradley T. Hughes2011-11-1612-194/+197
| | | | | | | | | | | | | Use QAtomic*::load() and ::store() instead of the deprecated cast, assignment, and comparison operators. These will be removed in the near future. The tests for these particular operators have not been changed, though, as the change to remove the operators will also remove the respective tests. Change-Id: I2f24d18992af0c6e0f487d707218e4e84f4bdd12 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Provide defaultFont with fontconfig dbJiang Jiang2011-11-151-1/+0
| | | | | | | | | | | So that it won't just return "Helvetica" that may not exist in target system. Providing it seems to fix QTBUG-21833 as well, thus we can remove the QEXPECT_FAIL statement in qlistview test. '_' appears to reach the minimum right bearing in some fonts. Task-number: QTBUG-21833 Change-Id: I2340af6ee736083ec4f6575e469840ebec4e545e Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Ensure that QOpenGLMultiGroupSharedResources are cleaned upKent Hansen2011-11-151-0/+23
| | | | | | | | | | | | | | | | | When a GL context group is destroyed, all multi-group shared resources associated with the group should be cleaned up. Otherwise we could get a double deletion in the resource's destructor, because it still retained a pointer to the deleted group. The missing cleanup resulted in a crash when the global static qt_gl_functions_resource was destroyed, first seen in the tst_examples autotest in qtdeclarative. It possibly didn't manifest before because it's event loop-dependent (the contexts are deleted via deleteLater()). Change-Id: I6b1e0bfdfbbb2bff8e795f545e680fcdfa094768 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add the ability to do unsafe SSL renegotiation as a fallback.Richard Moore2011-11-151-0/+3
| | | | | | | | | | | This commit adds the ability to perform legacy SSL renegotiation as a fallback via QSsl::SslOptions. This is something that used to work, but has been disabled by default in newer versions of openssl. The need for this has been reported by users (eg. in QTBUG-14983). Change-Id: I5b80f3ffd07e0c5faddc469f6a8f857bac5740f7 Reviewed-by: Corentin Chary <corentin.chary@gmail.com> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* moc: fix Q_INVOKABLE returning referencesOlivier Goffart2011-11-151-0/+16
| | | | | | | | | | | | | | | | | | | The moc generated code would not compile otherwise Keep Moc::parseFunction and Moc::parseMaybeFunction in sync (the first is used for signals and slots, and the second for normal functions such as Q_INVOKABLE) Last patch that introduced function pointer updated parseFunction but not parseMaybeFunction When a slot return a reference, moc generate code that make the MetaObject system think it is a void, so qt_metacall and invokeMethod do not mess with the return value. But when we want to take the function signature, in the IndexOfMethod call, we need to have the exact return type. Change-Id: I4661218d7ce367ad3934e73929e7d04f0a6dbc09 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Always use the hex format for certificate serial numbers.Richard Moore2011-11-151-1/+1
| | | | | | | | | In Qt 4.x the serial number is reported by a mixture of the hex value and the number, The hex is what is used by other tools, and we should do the same. Change-Id: Ia0361d43fb5b920d053c95e932e0c8a012436e5e Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Allow to create a custom event dispatcher for specific QThreads.Sven Anderson2011-11-152-0/+129
| | | | | | | | | | | | | | QAbstractEventDispatcher() does no longer install itself into the current thread. Instead the new methods QThread::setEventDispatcher() and QCoreApplication::setEventDispatcher() allow to install a custom event dispatcher into any QThread as long as there is no default event dispatcher created yet. That is, before the thread has been started with QThread::start() or, in case of the main thread, before QCoreApplication has been instantiated. Change-Id: I7367e13d8d8aebed5a5651260bb69b8818eb1b90 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Remove obsolete QSKIP parameter.Jason McDonald2011-11-151-1/+1
| | | | | Change-Id: I269337d802ec6b383a496fe8dc62a6b11e4d61c5 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Compile on Mac OS XBradley T. Hughes2011-11-151-1/+1
| | | | | | | | privateqt_mac_p.h lives in QtWidgets/private/qt_mac_p.h now instead of QtGui/private/... Change-Id: I77e57de5581829e78919b13b10f7a896879670a7 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Integrate testcocoon support into Qt build system.Rohan McGovern2011-11-151-1/+2
| | | | | | | | | | | | To instrument a Qt application or library with the TestCocoon coverage tool, do `CONFIG+=testcocoon' in the application .pro file. To instrument Qt itself with testcocoon, use the `-testcocoon' configure option. Change-Id: Ie77109a078d11ea51f7a073621e0df9c752c44ae Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Avoid crash in QColumnView autotest.Jason McDonald2011-11-151-0/+5
| | | | | | | | | | | | | When combined with http://codereview.qt-project.org/8644, the test crashes. This appears to be due to a column of the view being deleted in response to calling setCurrentIndex(), as documented in QTBUG-22707. This commit must be merged at the same time as http://codereview.qt-project.org/8644. Task-number: QTBUG-22707 Change-Id: I075be7df5d9196e37e2286e61d317086a76a167d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix for QMessageBox's autotest.Mikko Knuutila2011-11-141-1/+2
| | | | | | | | | | Mnemonic shortcut caused string comparison to fail. Task-number: QTBUG-22119 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> (cherry picked from commit 11a6d868b5613dd7fdbef02198aaf9566fcd1f17) Change-Id: I11a6d868b5613dd7fdbef02198aaf9566fcd1f17