summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* test: Leftover for split `qsqlquery' unit and benchmark testSergio Ahumada2011-10-253-0/+7
| | | | | | | | | Add new directory structure to benchmarks.pro file introduced by 3172631f0d40f34249f376f9b94a40919573d0c7 . Task-number: QTQAINFRA-353 Change-Id: I998530cd00bb1849f7a42816d61195f6a5bb4b92 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove QSKIPs from qgraphicslinearlayout testJason McDonald2011-10-251-4/+3
| | | | | | | | | | If the test decides not to do some extra testing for certain styles, but doesn't find any failures in what it has done so far, it should pass rather than skipping. Removing the QSKIPs also corrects the leakage of the memory pointed to by "widget". Change-Id: Ibd0f3f0605660c92e9bab2a3d1d9f31b52192575 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove QSKIPs from qgraphicsgridlayout testJason McDonald2011-10-251-6/+6
| | | | | | | | | | If the test decides not to do some extra testing for certain styles, but doesn't find any failures in what it has done so far, it should pass rather than skipping. Removing the QSKIPs also corrects the leakage of the memory pointed to by "widget". Change-Id: Id4cf7e8dc48f836d2c6dcde57dde87797a2fe036 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Improve qhostinfo autotest on HPUX 11iJason McDonald2011-10-251-13/+9
| | | | | | | | | | | | | Several test functions use IPv6 reverse lookups, which evidently don't work on HPUX 11i, but only one of these tests was skipped on that platform and the others presumably fail. This commit also removes the commented-out test data and makes it easier to put some useful test data back. QTBUG-22287 records the fact that no real IPv6 hostnames are currently used in the reverseLookup test. Change-Id: Iff1ed1b725492bcc28ca4cb5f8e2dc106887c0b4 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* gui: eliminated usage of qttest_p4.prfRohan McGovern2011-10-2572-163/+213
| | | | | | | | | 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: I97046aa51f1b3fc100e2eb2fa115f1bf8ae6437d Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* corelib: eliminated usage of qttest_p4.prfRohan McGovern2011-10-25127-265/+371
| | | | | | | | | 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>
* Don't call QSKIP/QVERIFY outside of test functions.Jason McDonald2011-10-251-19/+24
| | | | | | | | | | | These macros should only be called inside a test function, otherwise they cannot abort the test function correctly. Solve this by making the helper function return a boolean result (and output a warning on failure to help with debugging) and verify the return value in each test function that calls the helper. Change-Id: I599673fda49051baf80a8c94b5d85a4d8c2cb406 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update bug number in autotests.Jason McDonald2011-10-252-2/+2
| | | | | Change-Id: I4b17736d86f8dc571090820a545107bb89cb493d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Network - Add QHostAddress::isLoopback API.Shane Kearns2011-10-241-0/+40
| | | | | | | | | | | | The standard IPv4 loopback address is 127.0.0.1, however anything in the 127.0.0.0/8 range is also a loopback address. isLoopback returns true for any address that is in the IPv4 loopback address range, or is the single IPv6 loopback address ::1 Task-number: QTBUG-22246 Change-Id: Ic39100e2e97a52db700e01b109998a1cfd4335e3 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* Extend QVariant benchmarksJędrzej Nowacki2011-10-241-0/+77
| | | | | | | Add new cases for custom types and QStringList. Change-Id: I79f8d415be43774e6b2488e8a6a8028bf4a5fd45 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* test: Split `qcontiguouscache' unit and benchmark testsSergio Ahumada2011-10-245-138/+204
| | | | | | | | | | | | | | | Moving three benchmark tests from 'tests/auto' to 'tests/benchmarks'. Also removing 'qttest_p4' usage while we are at it. - void asScrollingList(); - void cacheBenchmark(); - void contiguousCacheBenchmark(); were moved to 'tests/benchmarks/corelib/tools/qcontiguouscache' Task-number: QTQAINFRA-353 Change-Id: Icbdd852f9c14c3df042d2e19abd42af6c645a3cb Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* tests: do not run benchmarks by default in 'make check'Sergio Ahumada2011-10-241-0/+4
| | | | | | | | | `make check' is intended primarily for running functional tests. For the most part, it does not make sense to run benchmarks in the same test environment as the functional tests. Change-Id: I33b2cf1e833fc6b1d0b3525018945148ba2d3492 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix qcolumnview test for shadow builds.Jason McDonald2011-10-241-2/+2
| | | | | Change-Id: I4a81d7c8504400d7fb4bb42fb93508ac28cfb990 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix qsidebar test for shadow builds.Jason McDonald2011-10-241-2/+2
| | | | | Change-Id: I3b58a1c81881401edb2a768b2a9995b1e833e90c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix qfilesystemmodel test for shadow builds.Jason McDonald2011-10-241-1/+1
| | | | | Change-Id: Ic9d174670f7411561bdfc0881b426a7ff1ab546d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix QFileDialog test for shadow builds.Jason McDonald2011-10-241-3/+3
| | | | | | | Using relative paths in #include is best avoided. Change-Id: Iacaab7b4c402dfc96f944f21c634afa6e4a2a32a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Multiline editors not to limit anchor position inputMethodQueryPekka Vuorela2011-10-241-0/+13
| | | | | | | | | | | | The queries were limited to current block, because that is the available surrounding text. Input method side, however, cannot then distinguish between anchor being really at start or end of the surrounding text, or beyond it. Without the limitation there at least is a way to know anchor is at unknown territory. Change-Id: I388d33566388344ec816ea7d86662b7e36a3d7d0 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* test: Split `qsqlquery' unit and benchmark testSergio Ahumada2011-10-234-39/+285
| | | | | | | | | | | | | Moving benchmark test from 'tests/auto' to 'tests/benchmarks'. Also removing 'qttest_p4' usage while we are at it. - void benchmark(); was moved to 'tests/benchmarks/sql/kernel/qsqlquery' Task-number: QTQAINFRA-353 Change-Id: I241bb1a2fba1c1b5524c21e5941a6c5daf5a4a89 Reviewed-by: Honglei Zhang <honglei.zhang@nokia.com>
* Fix compilation with -fno-exceptionsDavid Faure2011-10-231-0/+4
| | | | | Change-Id: I3dbe8be62d2fe94ed6f97fb565a9e417544c58f9 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* Deprecate QDesktopServices::storageLocation/displayNameDavid Faure2011-10-232-53/+9
| | | | | | | Which required porting the related unittests to qstandardpaths Change-Id: I6eb63c46845f05cd29cc42b59872707526277c90 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* Add the missing unittestDavid Faure2011-10-232-0/+294
| | | | | Change-Id: I2384d9de7b9ef409db521087670070bd5afc85ff Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* Check QFileInfo::isExecutable for symlinks, works as intended.David Faure2011-10-231-1/+18
| | | | | Change-Id: I35acce7ba0e111f651864b9d16abf1bac1923f22 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* QStandardPaths: add Config and GenericData, add methodsDavid Faure2011-10-231-0/+1
| | | | | | | New methods: standardLocations, locate, locateAll. Change-Id: I60bc90f8df53727a72c4b1839ea4d1d88a204e29 Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
* Fix QTemporaryFile regressions and new found issuesJoão Abecasis2011-10-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, the file template is always processed in original QString format. Trying to generate native paths before adding a missing placeholder mask could change the meaning of templates, such as "." and "..", which are now tested to mean "..XXXXXX" and "...XXXXXX", respectively. After ensuring the template includes a placeholder mask, the path is converted to a native *absolute* file path and the mask is sought for again. On Windows, native paths were already absolute. On Symbian, we'd need at least a clean path, as "." and ",," are not natively understood. There is a requirement that the placeholder mask /XXXXXX+/ makes it through this conversion unaltered, which relaxes prior requirements on *nix platforms. On Windows and Symbian the conversion is under Qt's control and not user-configurable. Reviewed-by: Shane Kearns (cherry picked from commit 401722ef9e6fe79bd41f9d5f79668f5c4997c8e6) Conflicts: tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp Change-Id: Iac823881c865adf0931dc4f429c6c1ef135eeb56 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Atomic implementation of create file and obtain handle for Win/SymbianJoão Abecasis2011-10-211-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Besides generating a unique name, createFileFromTemplate now also acquires a file handle on all platforms. The file engine's native handle is passed by reference and modified in place. This fixes a long standing security issue on Windows. On Windows and Symbian platforms we directly use the "native" file path when processing the template and generating the unique name. Since the native encoding is known, conversions at this point are safe. Errors other than "file exists" are propagated to Q(Temporary)File, and result in a failure in open(). The changes also unify error handling and should give consistent behaviour across all platforms. Worthy of note, there's a change in behaviour on Windows and Symbian: fileNames returned by QTemporaryFile on Windows and Symbian are always absolute after open has been called. This has to do with how QFileSystemEntry::nativeFilePath works on these platforms. (Test was updated to reflect change in behaviour.) Reviewed-by: Gareth Stockwell Reviewed-by: Shane Kearns (cherry picked from commit ff9b69838ec146aeb43d4af8a03043f9c5f0454d) Conflicts: tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp Change-Id: Ibc9affb321ea4f4b193efc1f7336c9770b43d8df Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Remove SkipMode parameter from QSKIP calls.Jason McDonald2011-10-21131-635/+550
| | | | | | | | | 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 QTest::SkipMode from qtestlib API.Jason McDonald2011-10-2118-22/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the SkipAll mode is used, tests only report a SKIP for the first line of test data and subsequent lines are not reported at all. This behaviour makes it impossible for anything post-processing test results to accurately report test pass- and run- rates because they cannot see how many lines of test data were skipped. This commit removes SkipMode. QSKIPs in regular test functions and data functions are treated the same as SkipSingle, so that every skipped line of local or global test data is reported in the test log. QSKIPs elsewhere are treated the same as SkipAll -- skipping in init() causes the next test function to be skipped entirely, and skipping in initTestCase() or initTestCase_data() causes all test functions to be skipped. This commit only changes qtestlib and the selftests. A further commit will change the autotests to remove the SkipMode parameter from QSKIP calls. Note that the change in expected output for the globaldata selftest is deliberate, as the QSKIP in the skipLocal test function has effectively changed from SkipAll to SkipSingle. Task-number: QTBUG-21851, QTBUG-21652 Change-Id: I7b1c53fe7ca9dde032810b789d967e2a402bbe5d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alex <alex.blasche@nokia.com>
* Moved tests into integrationtests/ and widgets/Jo Asplin2011-10-20765-238/+270
| | | | | | | Task-number: QTBUG-19013 Change-Id: Ibb776f5967c0645ce6d22ef7afdc40657c575461 Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
* Add the ability to enable various SSL bug workarounds.Richard Moore2011-10-202-0/+104
| | | | | | | | | | | | | There are lots of buggy SSL servers around and to connect to them you need to disable various features. This commit adds the ability to disable the SSL ticket extension, the ability to disable the insertion of empty fragments, and the ability to disable compression. Task-number: QTBUG-21906 Change-Id: I3e1d0347a46e9030b889bbf15b2aad19b8513b73 Merge-request: 68 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Fix tst_qsocketnotifierShane Kearns2011-10-201-44/+1
| | | | | | | | | Removed the bogusFds test, as it is only run on symbian in 4.8 Forward ported the posixSockets fix from 4.8 Task-number: QTBUG-20892 Change-Id: I8a8c67e12eae402724bbb07fe37e7ea1770aaeee Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Revert "Update V8"Kent Hansen2011-10-204-63/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1c4a5fcab76d1b769a4c0369d40dd0dd7c0e7495 Several of the qtdeclarative tests and examples are dying randomly with messages like this: > > # > # Fatal error in ../3rdparty/v8/src/objects-inl.h, line 2169 > # CHECK(object->IsJSFunction()) failed > # > > > ==== Stack trace ============================================ > > > ==== Details ================================================ > > ==== Key ============================================ > > ===================== > > Aborted (core dumped) Change-Id: Iebaa2497a6f6ef616ef4c3576c217d2a8a2c1ea5 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Move the non-atomic and implicit functions from QBasicAtomicXXXThiago Macieira2011-10-201-1/+1
| | | | | | | | | Now, users of QBasicAtomicInt and QBasicAtomicPointer must be sure to use .load() and .store() to access the values. Change-Id: I6b48ed175618baf387dd38d821bd50e6e93c082e Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update keyToValue and keysToValue in QMetaEnumLiang Qi2011-10-191-18/+53
| | | | | | | | | | Add a ok return value for whether found or not. Task-number: QTBUG-21672 Reviewed-by: Olivier Goffart Change-Id: Ic0ea7455dccf1ac91705bcc1479444eb4091ded3 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Liang Qi <liang.qi@nokia.com>
* Update V8Aaron Kennedy2011-10-194-0/+63
| | | | | Change-Id: I7a9da7dbb2116a441788407d60ed10155cded941 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Refactor QAccessibleActionInterface.Frederik Gladhorn2011-10-191-108/+68
| | | | | | | Some refinements done by Jan-Arve Sæther. Change-Id: I99195b3c7273316cfa9c46e451924bbcfddd11a9 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Introduce Q_STATIC_ASSERTJędrzej Nowacki2011-10-191-0/+68
| | | | | | | | | Example of message of failed assert (gcc 4.6, file tst_qglobal.cpp:300): tst_qglobal.cpp:300:92: error: invalid application of ‘sizeof’ to incomplete type ‘QStaticAssertFailure<false>’ Change-Id: Ic1798094f718eaad388d754034115aafbbb6bd5e Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Add benchmarks for QMetaType::construct()Kent Hansen2011-10-192-0/+98
| | | | | Change-Id: Ia5883c5712e5d634b0e62189b639209eb3d5cd93 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Provide API for "placement new" construction of meta-typesKent Hansen2011-10-192-0/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By making it possible to specify the place in memory where a type should be constructed, any meta-type can be allocated on the stack, for example. In the QML/JS QObject binding, this makes it possible to call slots and access properties from JavaScript without having to perform any mallocs (e.g. due to QVariant creation) in the C++ <--> JS value conversion, in the best case. In addition to QMetaType::construct() and QMetaType::destruct(), this change introduces QMetaType::typeSize(), which returns the size of a type in bytes. This can be used to prepare a suitable buffer for constructing a type using construct(). Benchmarks indicate that in-place construction is 2-5x faster than normal construction for core and GUI types on linux-g++. Note that there is already a QMetaType::construct() function in Qt 4, which has been renamed to QMetaType::create() in Qt 5. In order to avoid existing usages of construct() in user code to call the Qt 5 construct() (when they really meant to call create()), the third argument ("copy") of construct() is made mandatory. Hence, calls to QMetaType::construct() written for Qt 4 will cause a compile error when compiled with Qt 5, and the user must adapt his code. Task-number: QTBUG-12574 Change-Id: I836f06f6ee1c1c3edbd199a03424c78c942bdd3e Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Sanitize paths in selftest data.Jason McDonald2011-10-1950-174/+174
| | | | | | | | Use a standard path for filenames that appear in the selftest's expected test data. This will make future patches smaller. Change-Id: I04b2e739d261f80d20b834e5b33c5b6e88d26379 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove skipglobal testlib selftest.Jason McDonald2011-10-199-172/+1
| | | | | | | | This test duplicates the skipinitdata selftest and has slightly less informative output. Change-Id: Ifd40e3ef8030059ec8fa0089ce5b2a994624abeb Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove DEPENDS_ON from qtestlib API.Jason McDonald2011-10-1920-653/+3
| | | | | | | | | | 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-1972-188/+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-191-17/+18
| | | | | | | | | Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear indication that this test won't be testing anything until it gets fixed for Qt5. Change-Id: I4fa73883f58d8d4a533a7c21ecd4dd5b3c55b174 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Prefer QSKIP to QTEST_NOOP_MAIN.Jason McDonald2011-10-192-10/+16
| | | | | | | | Use QSKIP instead of QTEST_NOOP_MAIN so that the user receives a clear indication that this test isn't testing anything when not built for X11. Change-Id: I9e9ef8fe738c06eb86f2ce398f6a515bf17e220a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Prefer QSKIP to QTEST_NOOP_MAIN.Jason McDonald2011-10-191-35/+19
| | | | | | | | | | | | | There is no way for a .pro file to know if QProcess is in the Qt build, so the QProcess autotest cannot be omitted from the build if QProcess is not available. Because of this limitation, the test was using QTEST_NOOP_MAIN when QProcess was not available, making the test appear to pass. This commit changes QTEST_NOOP_MAIN to QSKIP, so that the user receives a clear indication that the test isn't testing anything when QProcess is not available. Change-Id: I79f667b17ff98dfc47eb61fb977365abef8883fb Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Prefer QSKIP to QTEST_NOOP_MAIN.Jason McDonald2011-10-183-91/+42
| | | | | | | | | 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: I977e24205a1bb7787ecddbdb1ebbeda1f2ded321 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>
* Reduce the runtime of tst_selftestsRohan McGovern2011-10-181-0/+6
| | | | | | | | | | | The addition of testing for multiple loggers greatly increased the total runtime of this test, in fact making it the slowest testcase in Qt. Fortunately this is only due to a couple of slow subtests whose behavior is unlikely to be affected by the loggers. Change it to run these slow subtests just for a couple of loggers, instead of all the combinations. Change-Id: Ie90f6c0ca29470ed6a7c4e2e185f852602a2d162 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Prefer QSKIP to QTEST_NOOP_MAIN.Jason McDonald2011-10-172-9/+25
| | | | | | | | | | | | | There is no way for a .pro file to know if exceptions are supported in the Qt build, so these tests cannot be omitted from the build if exceptions are not supported. Because of this limitation, these tests were using QTEST_NOOP_MAIN when exceptions were not available, making the tests appear to pass. This commit changes QTEST_NOOP_MAIN to QSKIP, so that the user receives a clear indication that the test isn't testing anything when exceptions are not available. Change-Id: I2facf08ba69e6f985e2da50dd36ad2658246b22e Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove qcopchannel autotest.Jason McDonald2011-10-177-265/+0
| | | | | | | The QCopChannel class was removed during Qt5 refactoring. Change-Id: I62914eca1db65c680d90233ce9dad5d891890c4a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>