summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/concurrent
Commit message (Collapse)AuthorAgeFilesLines
* Remove TESTED_CLASS/TESTED_FILES comments from tests.Jason McDonald2011-12-061-3/+0
| | | | | | | | | These comments were mostly empty or inaccurate. Appropriate naming of tests and appropriate placement of tests within the directory tree provide more reliable indicators of what is being tested. Change-Id: Ib6bf373d9e79917e4ab1417ee5c1264a2c2d7027 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Cleanup corelib autotestsJason McDonald2011-11-251-2/+5
| | | | | | | | | | Bug trackers come and go, so using bug identifiers in function and test case names will ensure that those names eventually become meaningless. It is better to choose a meaningful name and provide explanatory comments where appropriate. Change-Id: I67c27782ef21b5d4eaab4854079a043c8ef6957b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Only use QVERIFY in test functions.Jason McDonald2011-11-241-16/+16
| | | | | | | | | | The modified test was using QVERIFY in the destructor of a local class, but QVERIFY should only be used directly in a test function. This commit changes the local class to record the result of the test and verifies that result in the test function. Change-Id: Ie68ac6aa880368c961ebfa67cd452f0fbf26db89 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add missing indentation to QFuture test.Jason McDonald2011-11-241-70/+68
| | | | | Change-Id: Iaceaa79237d5ef6e81d1d16dc5e3fd3d97631f3a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* qtbase tests: Fix some warningsFriedemann Kleint2011-11-214-3/+3
| | | | | | | | - 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>
* Don't depend on moc to disable test functions.Jason McDonald2011-11-181-8/+8
| | | | | | | | | | | | | | | | | | | | | 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>
* Remove warnings from deprecated atomic operators in autotestsBradley T. Hughes2011-11-166-52/+52
| | | | | | | | | | | | | 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>
* Cleanup corelib autotestsJason McDonald2011-11-143-12/+0
| | | | | | | | | | | | | Remove various disabled and/or non-helpful debugging code. Any test diagnostics that are useful should be part of the regular test output, as the CI system cannot switch on commented-out code when there is a test failure. Diagnostics should also be informative -- simply printing the value of a variable with no other information about what is being printed (or why it is being printed) is not informative. Change-Id: I21a6c2121be86001bb57e80f426507b6e619ee9e Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove commented code from qfuture test.Jason McDonald2011-11-141-20/+0
| | | | | | | | | | The removed code was already commented out when first added in November 2007 and is nowhere near compiling. If there was anything of value here, anyone who is able to find it is free to re-add a version that actually works. Change-Id: I4a7127a272254224f6a1e65fbd2a01000a4d2be9 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Cleanup corelib autotestsJason McDonald2011-11-1110-36/+26
| | | | | | | | | | | | | Tidy the autotest .pro files. Most autotest .pro files should look like this: CONFIG += testcase TARGET = tst_something QT = core testlib SOURCES = tst_something.cpp Change-Id: I877c2194e9fa9dd13478d117895e1e255a948ad7 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete code from qtconcurrentiteratekernel test.Jason McDonald2011-10-311-44/+0
| | | | | | | The removed code refers to WhileIteration, which does not exist. Change-Id: I4c44bc319ac776d16ce9ba7b5c2938ce1642a3f6 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete code from qtconcurrentrun test.Jason McDonald2011-10-311-71/+29
| | | | | | | | | The removed code was left over from an unfinished MSVC6 compatibility API (see commit e3e28e7a in the grafted history). That compiler is no longer supported, so this code can be retired. Change-Id: I81bcfa771ae13579f2458eb2d3ebf41c6af8577c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove obsolete QSKIP call.Jason McDonald2011-10-271-4/+0
| | | | | | | | The bug referenced in the QSKIP has been marked as resolved, so this QSKIP should no longer be needed. Change-Id: I41dd964827a3df8fb5ebb9674cef9db59c03d432 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* corelib: eliminated usage of qttest_p4.prfRohan McGovern2011-10-2510-20/+30
| | | | | | | | | qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4. It enables various crufty undocumented magic, of dubious value. Stop using it, and explicitly enable the things from it which we want. Change-Id: I7c1ffe9c8c294dbdc988e1582e580b1ed3f4593e Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Remove SkipMode parameter from QSKIP calls.Jason McDonald2011-10-212-3/+3
| | | | | | | | | The previous commit removed SkipMode from the testlib APi. This commit removes the parameter from all calls to QSKIP. Task-number: QTBUG-21851, QTBUG-21652 Change-Id: I21c0ee6731c1bc6ac6d962590d9b31d7459dfbc5 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove DEPENDS_ON from qtestlib API.Jason McDonald2011-10-191-15/+0
| | | | | | | | | | The DEPENDS_ON macro didn't do anything and has misled many users to think that they can write test functions that depend on other test functions. Task-number: QTBUG-21851 Change-Id: Ibe65b2d5d88bb81b6a0ebbe0b220f7d409a1446c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Move QTRY_VERIFY/QTRY_COMPARE into testlib.Jason McDonald2011-10-191-1/+0
| | | | | | | | These functions have lived in tests/shared/util.h for a long time, but they really belong in qtestlib. Change-Id: I60d569d002dea220b51563931d8b7aa77a20b98b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Prefer QSKIP to QTEST_NOOP_MAIN.Jason McDonald2011-10-182-16/+26
| | | | | | | | | Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear indication that these tests aren't testing anything when the required defines are not defined. Change-Id: I8508f50c6264fafa836090c5d6ffa6ce02dda102 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Exclude qtconcurrent tests via .pro files.Jason McDonald2011-10-1212-127/+8
| | | | | | | | | | | If Qt is built without QtConcurrent, the relevant autotests should be excluded from the build, rather than building empty tests that appear to pass and thus produce confusing test results. Change-Id: I43bafcb0ffa42e8981bec4e27bf6a23a28d86df9 Reviewed-on: http://codereview.qt-project.org/6395 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Avoid using QSKIP in lieu of compile-time checksJason McDonald2011-10-055-31/+29
| | | | | | | | | | | | | | | | QSKIP is intended to be used to skip test functions that are found at run-time to be inapplicable or unsafe. If a test function can be determined to be inapplicable at compile-time, the entire test function should be omitted instead of replacing the body of the test function with a QSKIP, which only serves to slow down test runs and to inflate test run-rates with empty, inapplicable tests. Task-number: QTQAINFRA-278 Change-Id: Ib2025339422749cf216e87ac414a3056250bf8f9 Reviewed-on: http://codereview.qt-project.org/5942 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove Symbian-specific code from tests.Jason McDonald2011-09-291-6/+0
| | | | | | | | | Symbian is not a supported platform for Qt5, so this code is no longer required. Change-Id: I1172e6a42d518490e63e9599bf10579df08259aa Reviewed-on: http://codereview.qt-project.org/5657 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Mark QtConcurrentFilter Autotest as insignificant, because it fails rarelyHolger Ihrig2011-09-281-0/+1
| | | | | | | | | Task-number: QTBUG-20688 Change-Id: I17b0016c66d3a6ada873f698a97bfcdaf60838f3 Reviewed-on: http://codereview.qt-project.org/5593 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
* Re-enabled test that was marked insignificant and passesHolger Ihrig2011-09-261-1/+0
| | | | | | | | | | | Added comment why QVariant Autotest is marked insignificant Task-number: QTBUG-21424 Change-Id: I5b911bd36e376ad529342055180ff9c5de19de67 Reviewed-on: http://codereview.qt-project.org/5399 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Wrap calls to Sequence::push_backJoão Abecasis2011-09-171-5/+0
| | | | | | | | | | | | | | | | | | | | | | | In C++11 push_back is overloaded to support rvalue-references, void std::vector<T>::push_back(const T &); void std::vector<T>::push_back(T &&); so attempting to get the address for push_back is ambiguous. Instead of hardcoding the function signature, the better and more general solution is to allow the compiler to do the required overload resolution itself, also allowing for implicit conversions to take place. Task-number: QTBUG-18996 Done-with: Liang Qi Reviewed-by: Olivier Goffart (cherry picked from commit ca34cc75294e0d2a8bc491a2c679fe8a69cd0408) Change-Id: Id271118e489f888905e491dd4cfc3d2db7697552 Reviewed-on: http://codereview.qt-project.org/4642 Reviewed-by: Liang Qi <liang.qi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Fix autotests to build on Windows.Friedemann Kleint2011-08-314-8/+15
| | | | | | | | | Basically breakage by <windows.h> being included from the OpenGL parts of <QtGui/QtGui> included from <QtTest/QtTest>. Change-Id: Id285fb89c64bf77e2408faac5688acd085579351 Reviewed-on: http://codereview.qt.nokia.com/3952 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Moving relevant tests to corelib/concurrentHolger Ihrig2011-08-3031-0/+9582
Adding tests for QFutureSynchronizer and QtConcurrentResultStore Added minor things in QFutureSynchronizer and QtConcurrentResultStore and removed tests for destruction Task-number: QTBUG-21066 Change-Id: I9f088b89463340f339c914bcb37fb2f9d3b62057 Reviewed-on: http://codereview.qt.nokia.com/3477 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>