Commit Graph

18 Commits

Author SHA1 Message Date
Jason McDonald
cf1de2f072 Restore commented-out data in QString test.
The restored test data was commented-out before the tests were imported
into the Qt repository in 2006, but appears to be valid and passes on
Linux.

Change-Id: I75795bf2b0b45fc2331bca6ac8d89f57cf12ed3d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-22 00:33:38 +01:00
Friedemann Kleint
e8b4c49efd qtbase tests: Fix some warnings
- 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>
2011-11-21 09:58:23 +01:00
Jason McDonald
a8fd0c3654 Don't depend on moc to disable test functions.
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:
    924d810dbd
    8aaff67510
    338d3f1197
    a55034062b
    253497b744
    7cfad460c5
    9d2ff58f36
    0cf6baa2d6

Change-Id: I947d797fe3ec76139ba1b55561cea569895662c5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-18 01:51:57 +01:00
Jason McDonald
94fc875079 Cleanup corelib autotests
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>
2011-11-11 02:45:05 +01:00
Jason McDonald
8e11f7c93a Cleanup corelib autotests
Remove literal tabs.

Change-Id: I210a0259773cceb20d35ebc80b889e3ebb88b540
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-10 04:42:45 +01:00
Jason McDonald
e8f7fccf22 Cleanup corelib autotests
Remove redundant empty constructors, destructors and test functions.

Change-Id: Idb51368895e67ec3fc0345a9a5d33d77730c051b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-07 13:26:41 +01:00
Jason McDonald
a6e6296ce3 Remove disabled code from QString autotest.
The removed code was disabled before the tests were imported into the Qt
repository in 2006, so its meaning or usefulness is lost in the mists of
time.

Change-Id: I3108a1a1d86cd135886608f47dcd88bf49f2d3fd
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-31 06:59:36 +01:00
Sergio Ahumada
c3313fdd1c Doc: Fixing typo
Fix typos I was able to find in `tests/auto' directory.

Change-Id: Id0bfcc18301381ac8b1ca8d5af17bd926e5913d4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-10-26 13:50:12 +02:00
Rohan McGovern
07102cebde corelib: eliminated usage of qttest_p4.prf
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>
2011-10-25 05:03:08 +02:00
Jason McDonald
27f9f136f7 Remove SkipMode parameter from QSKIP calls.
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>
2011-10-21 01:20:29 +02:00
Jason McDonald
924d810dbd Avoid using QSKIP in lieu of compile-time checks
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: I95feba3edbfa092c0ef4d85bb8c6877bd6be698e
Reviewed-on: http://codereview.qt-project.org/6128
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-07 04:30:30 +02:00
Jason McDonald
7cfad460c5 Avoid using QSKIP in lieu of compile-time checks
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>
2011-10-05 03:04:31 +02:00
Friedemann Kleint
f18b690cca Tests: Fix compilation on Windows.
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>
2011-10-03 07:57:41 +02:00
David Faure
b863df7de9 Rename Qt::escape to QString::toHtmlEscaped, add compat method
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>
2011-09-29 15:22:07 +02:00
Jason McDonald
95cebd34eb Remove Symbian-specific code from tests.
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>
2011-09-29 06:41:42 +02:00
Bradley T. Hughes
a219b8f382 Fix QString and QByteArray reserve() and squeeze()
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>
2011-09-23 13:42:22 +02:00
Samuel Rødal
a6b6e760ac Merge remote branch 'gerrit/master' into HEAD
Conflicts:
	configure.exe
	src/corelib/global/qglobal.h
	src/gui/kernel/qplatformnativeinterface_qpa.h
	src/gui/widgets/qlinecontrol.cpp
	src/gui/widgets/qmenu_mac.mm
	src/gui/widgets/qmenu_p.h
	src/gui/widgets/qmenubar.cpp
	src/gui/widgets/qmenubar_p.h
	src/gui/widgets/widgets.pri
	src/plugins/platforms/wayland/qwaylandnativeinterface.cpp
	src/plugins/platforms/wayland/qwaylandnativeinterface.h
	src/src.pro
	tests/auto/qdir/tst_qdir.cpp
	tests/auto/qfileinfo/tst_qfileinfo.cpp
	tests/auto/qsslsocket/tst_qsslsocket.cpp
	tests/auto/qstring/tst_qstring.cpp

Change-Id: I64cf2cefa532ba87a92f632e3595ce6914183e9b
2011-09-06 10:55:40 +02:00
Holger Ihrig
5c27f0a2fb Moving relevant tests to corelib/tools
Task-number: QTBUG-21066

Change-Id: I650f8f7826b9feea7c1484f06e03e10c68ec2b65
Reviewed-on: http://codereview.qt.nokia.com/3712
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2011-09-01 13:07:23 +02:00