summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Make all uses of QBasicAtomicInt and Pointer use load() and store()Thiago Macieira2011-10-037-54/+54
| | | | | | | | | | | | | | Most of these changes are search-and-replace of d->ref ==, d->ref != and d->ref =. The QBasicAtomicPointer in QObjectPrivate::Connection didn't need to be basic, so I made it QAtomicPointer. Change-Id: Ie3271abd1728af599f9ab17c6f4868e475f17bb6 Reviewed-on: http://codereview.qt-project.org/5030 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Tests: Fix compilation on Windows.Friedemann Kleint2011-10-0313-43/+36
| | | | | | | | | Replace Q_WS_... by Q_OS_... in corelib tests. Change-Id: I14c41dca1ec490b3c49ba2c24e60def14c6de9da Reviewed-on: http://codereview.qt-project.org/5778 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* test: Re-enabled `tst_moc' test that is now passing on LinuxSergio Ahumada2011-10-031-2/+0
| | | | | | | | | | This test was fixed by 1cc70b92c8c838a013b45af6814ea6532245067a Change-Id: If6fa3724f7c31e952ebff1dd27fea1a1e4635a85 Reviewed-on: http://codereview.qt-project.org/5783 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
* test: Re-enabled `tst_qtranslator' test that is now passing on LinuxSergio Ahumada2011-10-031-2/+0
| | | | | | | | | | This test was fixed by db3418c10b7831db0e6c567ccf49c34698cad1ab Task-number: QTBUG-21125 Change-Id: I1bc549353f16c0df2b6c33533298b302fcc4d4ed Reviewed-on: http://codereview.qt-project.org/5877 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Avoid using QSKIP in lieu of compile-time checksJason McDonald2011-10-039-166/+139
| | | | | | | | | | | | | | | 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: I31e069f5476f8adf9851e94b33c6afac4394b88e Reviewed-on: http://codereview.qt-project.org/5824 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Rename Qt::escape to QString::toHtmlEscaped, add compat methodDavid Faure2011-09-292-22/+22
| | | | | | | | | Merge-request: 56 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Change-Id: I46bbb2df10968e88b5eb5ef8dae182a651b622b8 Reviewed-on: http://codereview.qt-project.org/5793 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Refactor accessibility for Qt5Jan-Arve Saether2011-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Moved most stuff to gui\accessible * Moved widget-specific stuff to widgets\accessible * Moved platform-specific code to either the bridge plugin (this was already the case) or to the platform plugin. * Added several classes and functions. These have not yet gone through an API review. The plan is to do that in a later commit. Classes: - QPlatformAccessibility - QWindowsAccessibility Functions: - QWindow *QAccessibleInterface::window(); - QPlatformAccessibility *QPlatformIntegration::accessibility() * The bridge code can now either be a plugin or integrated into the platform plugin * Mac accessibility is left out for now. Unix "should still work" (tm). These platforms should be fixed soon. Change-Id: Ib49ffa73b647ee0af90864544c2769440157f562 Reviewed-on: http://codereview.qt-project.org/5330 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Remove obsolete function isHeaderVisible.Frederik Gladhorn2011-09-291-4/+4
| | | | | | | | | | | This function was deprecated in Qt4 and has been replaced by isNavigationBarVisible. Same for the setter. Change-Id: Ifdcbaa2db0d4d8d475d959a6409347fa19d443a9 Reviewed-on: http://codereview.qt-project.org/5788 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Fix moc autotestLars Knoll2011-09-292-2/+2
| | | | | | | | | | QWidget is not in QtGui anymore, this broke the test. Simply use QWindow instead. Change-Id: Ic0176410f08b10771b663aa3ecd70295c124b662 Reviewed-on: http://codereview.qt-project.org/5757 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Remove Symbian-specific code from tests.Jason McDonald2011-09-29330-7751/+395
| | | | | | | | | 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>
* reimplemented doUpdateMicroFocus to work without calling the base implementationMatthew Cattell2011-09-281-1/+11
| | | | | | | | | Change-Id: Ic96ab2bb93248e6d3ba1c8b789ed3c21f8ad39bd Reviewed-on: http://codereview.qt-project.org/5716 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Jo Asplin <jo.asplin@nokia.com> Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
* QTemporaryFile: Test what happens if current dir isn't writable.David Faure2011-09-281-0/+17
| | | | | | | | | | | No surprises, QTemporaryFile("tempXXXXXX") fails. But that is consistent with QFile::open, and it's documented, so ok. Change-Id: I04c805a242aeda8327d25be238da6120b3c90f5a Merge-request: 57 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-on: http://codereview.qt-project.org/5714 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* QTemporaryFile: use QCoreApplication::applicationName() as base filenameDavid Faure2011-09-281-1/+3
| | | | | | | | | | Merge-request: 57 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Change-Id: I2a29b2ba925ea92a5299272b80164658775e9c0e Reviewed-on: http://codereview.qt-project.org/5713 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Remove support for QWidget specific input contextsPekka Vuorela2011-09-285-92/+37
| | | | | | | | | | QInputContext is migrated to QInputPanel, which allows only one instance. Change-Id: I4912164790d5a6bdff41e11cbe4bc4e2f9f111ec Reviewed-on: http://codereview.qt-project.org/5641 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make qtbase build with Qt-in-namespace againKent Hansen2011-09-281-3/+3
| | | | | | | Change-Id: I5faa8690a05d6ec352fc69c0b69848539f2ed216 Reviewed-on: http://codereview.qt-project.org/5460 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make QTest::qWarn() use __FILE__ and __LINE__.Jason McDonald2011-09-281-6/+7
| | | | | | | | | | This change makes QTest::qWarn() consistent with similar testlib functions, which take __FILE__ and __LINE__. Change-Id: I12977cb30672899ab38877b4a656f0cc0c7ea02c Reviewed-on: http://codereview.qt-project.org/3559 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Simplify QAccessibleTextEdit.Frederik Gladhorn2011-09-281-12/+13
| | | | | | | | | | Before the text edit tried to represent each line of text as a child of itself. With the editable text interface this is no longer needed. Change-Id: If9927e522f955e863e91fd0a529a1ce6fafaddc3 Reviewed-on: http://codereview.qt-project.org/5624 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Remove dead code from QAccessibleTabBar.Frederik Gladhorn2011-09-281-7/+21
| | | | | | | Change-Id: I084259184228beea4374e8c5370f9a21064cae26 Reviewed-on: http://codereview.qt-project.org/5526 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jan-Arve Sæther <jan-arve.saether@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 and made it pass on LinuxJo Asplin2011-09-282-7/+5
| | | | | | | | | Task-number: QTBUG-20753, QTBUG-21424 Change-Id: Icc4abf82c243b31b43d167df921e0585a5e89a1e Reviewed-on: http://codereview.qt-project.org/5553 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com> Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
* Simplify QAccessibleDial and make it inherit QAccessibleAbstractSlider.Frederik Gladhorn2011-09-271-32/+21
| | | | | | | | | This adds the value interface and removes the children of the dial. Change-Id: I47eac77c01dce36db077f553054ef37353242f77 Reviewed-on: http://codereview.qt-project.org/4821 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Re-enabled tests that are now passing on LinuxJo Asplin2011-09-264-8/+0
| | | | | | | | | Task-number: QTBUG-21424 Change-Id: I093d90a2713a7e7ddace31a27a08d47e3c2da588 Reviewed-on: http://codereview.qt-project.org/5546 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
* Tidy and sort the list of selftestsJason McDonald2011-09-261-44/+38
| | | | | | | Change-Id: I123a775e2d56fc0c64d43e98a1d2e3ab68394076 Reviewed-on: http://codereview.qt-project.org/5492 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Use placeholder for Qt version in expected outputJason McDonald2011-09-2639-53/+51
| | | | | | | | | | | | | The selftests already used the @INSERT_QT_VERSION_HERE@ placeholder in place of the real Qt and QTestlib versions in the expected test output of the subtests. For unknown reasons, the same was not true for the expected plain text output. In the past, this has caused Release Managers to waste time incrementing the version numbers in these files. Change-Id: I52f7870486fce128c04d53ff06978afa947474fd Reviewed-on: http://codereview.qt-project.org/5375 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Re-enabled test that was marked insignificant and passesHolger Ihrig2011-09-267-7/+1
| | | | | | | | | | | 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>
* Remove obsolete exclusion from selftest checkingJason McDonald2011-09-261-3/+0
| | | | | | | | | There is no test with a datatag "float", so this code is never executed. Change-Id: I9dd234e6575eb1c33075705edf77eb1d977061c9 Reviewed-on: http://codereview.qt-project.org/5362 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Don't XFAIL on the contents of assert messages.Jason McDonald2011-09-261-28/+6
| | | | | | | | | | | | | | | Q_ASSERT uses __FILE__, which has undefined contents, and thus the selftest cannot always match Q_ASSERT messages in actual output with those in expected output. The test was calling QEXPECT_FAIL() in this case, but doing so implies that (a) it's a failure and (b) we intend to fix it one day. Neither of these is true, so instead we should simply tolerate this difference in actual and expected outputs, in the same way that we do in a couple of other similar cases. Change-Id: I8b8609a400e9b798936875f6eb1ca18a83660efc Reviewed-on: http://codereview.qt-project.org/5358 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Re-enabling tests that were marked insignificant but not failingHolger Ihrig2011-09-2310-19/+0
| | | | | | | | | | Task-number: QTBUG-21402 Change-Id: Ibcc2cff81aff669c02b1b7b2c0cb599646b0dd61 Reviewed-on: http://codereview.qt-project.org/5455 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com> Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
* Fix QString and QByteArray reserve() and squeeze()Bradley T. Hughes2011-09-232-0/+16
| | | | | | | | | | | | | | | | | These functions should not take care not to unconditionally set the capacityReserved private member, since the d may be referencing the const shared_null or shared_empty which live in read-only memory. The squeeze() methods check for ref > 1 instead of ref != 1 to prevent detaching from the shared_null/shared_empty unnecessarily; the shared_null/shared_empty ref count is -1, meaning squeeze() will never detach from it. Change-Id: Id3f1725a6f08b3a462343640a47bbe78f08ca7e7 Rubberstamped-by: Lars Knoll Reviewed-on: http://codereview.qt-project.org/5454 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Implemented QWidget's move() vs setGeometry() distinction in QWindow.Samuel Rødal2011-09-231-1/+94
| | | | | | | | | | | | | | QWidget's move() sets the position of the window including the window frame, unlike setGeometry(). There was no equivalent for this in QWindow, so several QWidget auto-tests were failing. Now we add setFramePos() to achieve the same purpose in QWindow. This fixes tst_QWidget::windowState(), which uses move(). Change-Id: I9a3e558bd615a8f0234cc3dd94fbb2bf5ecbc148 Reviewed-on: http://codereview.qt-project.org/5405 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Patch toward fixing tst_QWidget::windowState().Samuel Rødal2011-09-231-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | In QWidget::setWindowState() there was some code to emulate window states when they're not supported by the backend, by hiding the window on minimize or using the screen geometry and the frameless window hint to manually try to make a window fullscreen. However, some of this code was being run even when the backend does support setting window states, specifically calling setParent(0) to force a re-creation of the platform window and calling show(). These led to the window getting the wrong position after being minimized or fullscreen and going back to the normal state. Apart from storing the normal geometry of a widget when going away from the normal state we shouldn't do any magic when the call to QPlatformWindow::setWindowState() succeeds. tst_QWidget::windowState() still fails due to calling move() to set the position of the widget including the frame, when QWindow currently only supports setting the position of the widget excluding the frame. Change-Id: I1c1a337d3c15f14c1c842bd1e347f94e6b67d7eb Reviewed-on: http://codereview.qt-project.org/5367 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Accessible ComboBox: remove virt children, add actions.Frederik Gladhorn2011-09-231-34/+56
| | | | | | | | | | Simplify the combobox implementation by removing child logic. Instead have an option to open the combobox. Change-Id: I1bb517d0d064aefa28594b8fa957b8b2c9d48e88 Reviewed-on: http://codereview.qt-project.org/5032 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Add autotest for QInputPanelJoona Petrell2011-09-233-0/+305
| | | | | | | Change-Id: I8ac28d93f610cd3eb69087d2c961a5aab6c47e1e Reviewed-on: http://codereview.qt-project.org/5394 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Re-enabled test and made it pass on LinuxJo Asplin2011-09-23100-1216/+1214
| | | | | | | | | | Task-number: QTBUG-21424 Change-Id: Ie63380f22d299708b2085652389869cac841e249 Reviewed-on: http://codereview.qt-project.org/5388 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com> Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
* Re-enabled test and made it pass on LinuxJo Asplin2011-09-238-15/+13
| | | | | | | | | | Task-number: QTBUG-21402 Change-Id: I54226c0aa63c70f9bb8ed8be3784918dd70e5592 Reviewed-on: http://codereview.qt-project.org/5382 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com> Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
* Support adding application fonts with QFontconfigDatabaseJiang Jiang2011-09-235-56/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFontDatabaseQPA should be able to reinitialize database and reregister all the fonts when an application font is added, because it will trigger db->invalidate(). Add cloneWithSize support to QFontEngineBox so that even no usable font is found in QFontDatabase, QRawFont::setPixelSize can still work (without making the result rawfont invalid). Register application fonts with QFontconfigDatabase, the code is adapted from QFontDatabaseX11. Reenable QRawFont tests for QPA, these usages are now supported in QPA. Fix QStaticText tests, raster in QPA does support transformations. Translate the text before ZAxix rotation so that it will be visible in canvas. Add back fixedPitch support to QPA, and fix QFontDatabase tests. Fix QGlyphRun tests, ignore non-existence glyphs in alphaMap locking. Fix QFontMetrics tests. Task-number: QTBUG-21415, QTBUG-20754, QTBUG-20977, QTBUG-20976, QTBUG-20760, QTBUG-20759 Change-Id: I24aea7d6ec6b2ac6342134d1f2591327c23a692b Reviewed-on: http://codereview.qt-project.org/5384 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Cast back to QWindow *Jo Asplin2011-09-235-46/+46
| | | | | | | | | | | Tests for widgets should select the QWidget * version of overloaded QTestLib functions rather than the QWindow * version. Change-Id: I8b540b630758c0e7ba7ed88aba45d624c83ff378 Reviewed-on: http://codereview.qt-project.org/4977 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
* Allow tests to log to multiple destinationsJason McDonald2011-09-231-20/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each destination and the format of output to write there is specified by adding "-o filename,format" to the command-line. The special filename "-" indicates that the log output is written to the standard output stream, though standard output can be used as a destination at most once. The old-style testlib output options are still supported, but can only be used to specify one logging destination, as before. If no logging options are given on the command-line, a plain text log will go to the console, as before. To log to the console in plain text and to the file "test_output" in xunit format, one would invoke a test in the following way: tst_foo -o test_output,xunitxml -o -,txt This commit also enhances the selftests to test with multiple loggers, but negative tests (e.g. bad combinations of command-line options) are left for future task QTBUG-21567. Task-number: QTBUG-20615 Change-Id: If91e752bc7001657e15e427aba9d25ab0a29a0b0 Reviewed-on: http://codereview.qt-project.org/4125 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Enable testlib self-testing with multiple loggersJason McDonald2011-09-231-129/+164
| | | | | | | | | | | | Modify the selftest to be able to run each subtest with a list of one or more test loggers. The addition of tests that use this capability will be part of a subsequent commit. Task-number: QTBUG-20615 Change-Id: Iac3efe8220e8245aa7e5589348d2c86b8034dd28 Reviewed-on: http://codereview.qt-project.org/5292 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Accessible Slider: Remove virtual children.Frederik Gladhorn2011-09-211-3/+15
| | | | | | | Change-Id: I58eca7d807b046b312117f9dbec6e2e36b5332cf Reviewed-on: http://codereview.qt-project.org/4820 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Accessible Scrollbar: Remove virtual children, value interfaceFrederik Gladhorn2011-09-211-27/+14
| | | | | | | Change-Id: I3a8e74130eb79d289143cb7ac7b8c47cdd3db90c Reviewed-on: http://codereview.qt-project.org/4819 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Don't run multiexec test with file loggingJason McDonald2011-09-211-2/+7
| | | | | | | | | | | | | | The multiexec test runs the same test object five times. If the -o option is given, the output file is overwritten by each run of the test object, meaning that tst_selftest only sees 1/5 of the test output in a file compared with what it sees on the console. This makes it impossible to use the expected output file to verify the test for both console and file output. This issue is noted in QTBUG-21561. Change-Id: I00031a2ea43a7ef78e8317473a089306ec062d8e Reviewed-on: http://codereview.qt-project.org/5270 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove printf calls from warnings selftestJason McDonald2011-09-212-18/+1
| | | | | | | | | | | | | | | | | The warnings selftest verifies that qtestlib correctly handles output sent via qDebug() and friends. The test had a number of printf calls that were used to tell the user what output they should expect to see next, but by bypassing testlib's logging, these made the testlog differ depending on whether the test log was directed to the console or a file. The printf calls are no longer needed, as any regressions in qDebug will be detected by tst_selftests, which compares the output of the warnings test with a reference copy of the expected output. Change-Id: I8c3a3237463141fa494c50ca02062760cb583090 Reviewed-on: http://codereview.qt-project.org/5200 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* This passes just fineLars Knoll2011-09-201-1/+0
| | | | | | | | Task-number: QTBUG-21424 Change-Id: Ied95373b2cf3882ec4f352ccbc285b578c66f83d Reviewed-on: http://codereview.qt-project.org/5003 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* This test passes fine.Lars Knoll2011-09-201-1/+0
| | | | | | | | Task-number: QTBUG-21402 Change-Id: Ied00dd2302b08d75e44c102f6025123b41657ca6 Reviewed-on: http://codereview.qt-project.org/5001 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix last few autotest gui/widgets dependenciesKent Hansen2011-09-203-4/+6
| | | | | | | | | | | | | | | | This is in preparation of removing testlib's dependency on QtGui and QtWidgets. Autotests that need QtWidgets api must explicitly include it (since the types are no longer provided by the QtGui master header). Change-Id: Ifd15f72e2c553fba0c399c921957c4e955bb590d Reviewed-on: http://codereview.qt-project.org/5191 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jo Asplin <jo.asplin@nokia.com> Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Improve globaldata testlib selftest.Jason McDonald2011-09-205-84/+394
| | | | | | | | | | | | | Make the test use qDebug instead of printf, so that the reference test output is the same regardless of whether the log goes to the console or a file. Also rename the test class, as it was evidently cut-n-pasted from the subtest selftest without being renamed. Change-Id: I8df1f0989f2e8c33c1f829ba8110fd740ff70f63 Reviewed-on: http://codereview.qt-project.org/5184 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Split subtest selftestJason McDonald2011-09-2014-246/+655
| | | | | | | | | | | | This test was attempting to verify two completely unrelated things, so this commit splits it into two tests. Also, printf calls are replaced by qDebug so that the test does not bypass the testlib loggers. Change-Id: I1a202af38ce2c69690a32d93405ba604ec6cabee Reviewed-on: http://codereview.qt-project.org/5178 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove waitwithoutgui testlib selftestJason McDonald2011-09-209-86/+1
| | | | | | | | | | | | | This test is not useful for finding bugs in qtestlib's logging code, because it bypasses the qtestlib loggers and doesn't play nice with tst_selftest. Neither is this test very useful for finding bugs in QTest::qWait(), as the test only proves the qWait() terminates, not that it waits accurately, or even that it waits at all. Change-Id: Ia5dd7cbaf3a6fbb4e94e54ed155263580e495694 Reviewed-on: http://codereview.qt-project.org/5173 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Move handling of -qmljsdebugger argument to QCoreApplicationKai Koehne2011-09-191-0/+8
| | | | | | | | | | | | Move handling of -qmljsdebugger= argument from QApplication to QCoreApplication. It makes sense to allow debugging also for applications based on QCoreApplication (which we intend to support in QtDeclarative). Change-Id: I5a03a4510fc166cea5aad146da673ee0e7cd5d36 Reviewed-on: http://codereview.qt-project.org/5121 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>