summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2012-03-12 23:52:36 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-12 23:52:36 +0100
commite104fe7266fa31b6d73f518ee57bfe584f88faac (patch)
tree25af68cb59a902381c722e9098ee46e9b5b98134 /tests
parente57e2f3e32cca2bf592a49cd62eaf567f3795c30 (diff)
parentd5098f2802255da10b749b93705084ad1fdfc6a5 (diff)
Merge "Merge remote-tracking branch 'origin/master' into api_changes" into refs/staging/api_changes
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/auto.pro1
-rw-r--r--tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp14
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp14
-rw-r--r--tests/auto/corelib/global/qglobal/tst_qglobal.cpp122
-rw-r--r--tests/auto/corelib/json/tst_qtjson.cpp33
-rw-r--r--tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp39
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp52
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp10
-rw-r--r--tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp703
-rw-r--r--tests/auto/corelib/tools/qlist/tst_qlist.cpp6
-rw-r--r--tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp85
-rw-r--r--tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.h4
-rw-r--r--tests/auto/gui/image/image.pro2
-rw-r--r--tests/auto/gui/image/qimagereader/qimagereader.pro2
-rw-r--r--tests/auto/gui/image/qimagereader/tst_qimagereader.cpp1
-rw-r--r--tests/auto/gui/image/qimagewriter/qimagewriter.pro2
-rw-r--r--tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp1
-rw-r--r--tests/auto/gui/image/qpixmap/tst_qpixmap.cpp43
-rw-r--r--tests/auto/gui/kernel/qdrag/qdrag.pro2
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp7
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.pro2
-rw-r--r--tests/auto/gui/kernel/qkeysequence/qkeysequence.pro2
-rw-r--r--tests/auto/gui/kernel/qmouseevent/qmouseevent.pro2
-rw-r--r--tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp20
-rw-r--r--tests/auto/gui/kernel/qpalette/qpalette.pro2
-rw-r--r--tests/auto/gui/kernel/qpalette/tst_qpalette.cpp1
-rw-r--r--tests/auto/gui/painting/painting.pro2
-rw-r--r--tests/auto/gui/painting/qbrush/qbrush.pro2
-rw-r--r--tests/auto/gui/painting/qpolygon/qpolygon.pro2
-rw-r--r--tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp1
-rw-r--r--tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro2
-rw-r--r--tests/auto/gui/text/qstatictext/qstatictext.pro2
-rw-r--r--tests/auto/gui/text/qstatictext/tst_qstatictext.cpp11
-rw-r--r--tests/auto/gui/text/qtextblock/qtextblock.pro2
-rw-r--r--tests/auto/gui/text/qtextpiecetable/qtextpiecetable.pro2
-rw-r--r--tests/auto/gui/util/qdesktopservices/qdesktopservices.pro2
-rw-r--r--tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp1
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp33
-rw-r--r--tests/auto/network/kernel/qnetworkinterface/qnetworkinterface.pro2
-rw-r--r--tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp97
-rw-r--r--tests/auto/network/network.pro4
-rw-r--r--tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp9
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp6
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/qsslsocket_onDemandCertificates_member.pro2
-rw-r--r--tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/qsslsocket_onDemandCertificates_static.pro2
-rw-r--r--tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp1
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp42
-rw-r--r--tests/auto/printsupport/kernel/kernel.pro4
-rw-r--r--tests/auto/printsupport/kernel/qprinter/.gitignore (renamed from tests/auto/gui/painting/qprinter/.gitignore)0
-rw-r--r--tests/auto/printsupport/kernel/qprinter/qprinter.pro (renamed from tests/auto/gui/painting/qprinter/qprinter.pro)0
-rw-r--r--tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp (renamed from tests/auto/gui/painting/qprinter/tst_qprinter.cpp)0
-rw-r--r--tests/auto/printsupport/kernel/qprinterinfo/.gitignore (renamed from tests/auto/gui/painting/qprinterinfo/.gitignore)0
-rw-r--r--tests/auto/printsupport/kernel/qprinterinfo/qprinterinfo.pro (renamed from tests/auto/gui/painting/qprinterinfo/qprinterinfo.pro)0
-rw-r--r--tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp (renamed from tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp)0
-rw-r--r--tests/auto/printsupport/printsupport.pro3
-rw-r--r--tests/auto/sql/kernel/qsql/qsql.pro2
-rw-r--r--tests/auto/sql/kernel/qsql/tst_qsql.cpp4
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.lightxml36
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.txt36
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.xml36
-rw-r--r--tests/auto/testlib/selftests/expected_cmptest.xunitxml36
-rw-r--r--tests/auto/testlib/selftests/expected_datetime.lightxml6
-rw-r--r--tests/auto/testlib/selftests/expected_datetime.txt6
-rw-r--r--tests/auto/testlib/selftests/expected_datetime.xml6
-rw-r--r--tests/auto/testlib/selftests/expected_datetime.xunitxml6
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.lightxml2
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.xml2
-rw-r--r--tests/auto/testlib/selftests/expected_expectfail.xunitxml2
-rw-r--r--tests/auto/testlib/selftests/expected_float.txt12
-rw-r--r--tests/auto/testlib/selftests/expected_strcmp.lightxml10
-rw-r--r--tests/auto/testlib/selftests/expected_strcmp.txt10
-rw-r--r--tests/auto/testlib/selftests/expected_strcmp.xml10
-rw-r--r--tests/auto/testlib/selftests/expected_strcmp.xunitxml10
-rw-r--r--tests/auto/testlib/selftests/expected_subtest.lightxml4
-rw-r--r--tests/auto/testlib/selftests/expected_subtest.txt4
-rw-r--r--tests/auto/testlib/selftests/expected_subtest.xml4
-rw-r--r--tests/auto/testlib/selftests/expected_subtest.xunitxml4
-rw-r--r--tests/auto/testlib/selftests/expected_verbose2.lightxml12
-rw-r--r--tests/auto/testlib/selftests/expected_verbose2.txt12
-rw-r--r--tests/auto/testlib/selftests/expected_verbose2.xml12
-rw-r--r--tests/auto/testlib/selftests/expected_verbose2.xunitxml24
-rw-r--r--tests/auto/testlib/selftests/expected_xunit.lightxml2
-rw-r--r--tests/auto/testlib/selftests/expected_xunit.txt2
-rw-r--r--tests/auto/testlib/selftests/expected_xunit.xml2
-rw-r--r--tests/auto/testlib/selftests/expected_xunit.xunitxml2
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp23
-rw-r--r--tests/auto/tools/qmake/testdata/one_space/one_space.pro5
-rw-r--r--tests/auto/tools/qmake/testdata/simple_app/simple_app.pro5
-rw-r--r--tests/auto/tools/qmake/testdata/simple_dll/simple_dll.pro5
-rw-r--r--tests/auto/tools/qmake/testdata/subdirs/simple_app/simple_app.pro5
-rw-r--r--tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple_dll.pro6
-rw-r--r--tests/auto/tools/rcc/.gitignore1
-rw-r--r--tests/auto/tools/rcc/data/binary/aliasdir/aliasdir.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/aliasdir/compressme.txt322
-rw-r--r--tests/auto/tools/rcc/data/binary/aliases.expected4
-rw-r--r--tests/auto/tools/rcc/data/binary/aliases.qrc10
-rw-r--r--tests/auto/tools/rcc/data/binary/allfeatures.de.expected13
-rw-r--r--tests/auto/tools/rcc/data/binary/allfeatures.de_CH.expected13
-rw-r--r--tests/auto/tools/rcc/data/binary/allfeatures.expected13
-rw-r--r--tests/auto/tools/rcc/data/binary/allfeatures.ko.expected13
-rw-r--r--tests/auto/tools/rcc/data/binary/allfeatures.locale3
-rw-r--r--tests/auto/tools/rcc/data/binary/allfeatures.qrc30
-rw-r--r--tests/auto/tools/rcc/data/binary/blahblah.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/currentdir.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/currentdir2.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/locale.de.expected5
-rw-r--r--tests/auto/tools/rcc/data/binary/locale.de_CH.expected6
-rw-r--r--tests/auto/tools/rcc/data/binary/locale.expected4
-rw-r--r--tests/auto/tools/rcc/data/binary/locale.it.expected6
-rw-r--r--tests/auto/tools/rcc/data/binary/locale.locale3
-rw-r--r--tests/auto/tools/rcc/data/binary/locale.qrc30
-rw-r--r--tests/auto/tools/rcc/data/binary/multiple.expected5
-rw-r--r--tests/auto/tools/rcc/data/binary/multiple.qrc10
-rw-r--r--tests/auto/tools/rcc/data/binary/otherdir/otherdir.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/prefixes.expected6
-rw-r--r--tests/auto/tools/rcc/data/binary/prefixes.qrc21
-rw-r--r--tests/auto/tools/rcc/data/binary/search_file.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/searchpath1/search_file.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/searchpath2/search_file.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/simple.expected3
-rw-r--r--tests/auto/tools/rcc/data/binary/simple.qrc7
-rw-r--r--tests/auto/tools/rcc/data/binary/subdir/subdir.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/test/german.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/test/test/test1.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/test/test/test2.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/test/testdir.txt1
-rw-r--r--tests/auto/tools/rcc/data/binary/test/testdir2.txt1
-rw-r--r--tests/auto/tools/rcc/data/images/images.bin.expected (renamed from tests/auto/tools/rcc/data/images.bin.expected)bin663 -> 663 bytes
-rw-r--r--tests/auto/tools/rcc/data/images/images.expected (renamed from tests/auto/tools/rcc/data/images.expected)0
-rw-r--r--tests/auto/tools/rcc/data/images/images.qrc (renamed from tests/auto/tools/rcc/data/images.qrc)0
-rw-r--r--tests/auto/tools/rcc/data/images/images/circle.png (renamed from tests/auto/tools/rcc/data/images/circle.png)bin165 -> 165 bytes
-rw-r--r--tests/auto/tools/rcc/data/images/images/square.png (renamed from tests/auto/tools/rcc/data/images/square.png)bin94 -> 94 bytes
-rw-r--r--tests/auto/tools/rcc/data/images/images/subdir/triangle.png (renamed from tests/auto/tools/rcc/data/images/subdir/triangle.png)bin170 -> 170 bytes
-rw-r--r--tests/auto/tools/rcc/data/parentdir.txt1
-rw-r--r--tests/auto/tools/rcc/rcc.pro7
-rw-r--r--tests/auto/tools/rcc/tst_rcc.cpp212
-rw-r--r--tests/auto/widgets/effects/effects.pro1
-rw-r--r--tests/auto/widgets/effects/qpixmapfilter/noise.png (renamed from tests/auto/gui/image/qpixmapfilter/noise.png)bin7517 -> 7517 bytes
-rw-r--r--tests/auto/widgets/effects/qpixmapfilter/qpixmapfilter.pro (renamed from tests/auto/gui/image/qpixmapfilter/qpixmapfilter.pro)0
-rw-r--r--tests/auto/widgets/effects/qpixmapfilter/tst_qpixmapfilter.cpp (renamed from tests/auto/gui/image/qpixmapfilter/tst_qpixmapfilter.cpp)0
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp2
-rw-r--r--tests/auto/widgets/kernel/kernel.pro1
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp4
-rw-r--r--tests/auto/widgets/kernel/qicon/.gitignore (renamed from tests/auto/gui/image/qicon/.gitignore)0
-rw-r--r--tests/auto/widgets/kernel/qicon/icons/testtheme/16x16/actions/appointment-new.png (renamed from tests/auto/gui/image/qicon/icons/testtheme/16x16/actions/appointment-new.png)bin897 -> 897 bytes
-rw-r--r--tests/auto/widgets/kernel/qicon/icons/testtheme/22x22/actions/appointment-new.png (renamed from tests/auto/gui/image/qicon/icons/testtheme/22x22/actions/appointment-new.png)bin1411 -> 1411 bytes
-rw-r--r--tests/auto/widgets/kernel/qicon/icons/testtheme/32x32/actions/appointment-new.png (renamed from tests/auto/gui/image/qicon/icons/testtheme/32x32/actions/appointment-new.png)bin2399 -> 2399 bytes
-rw-r--r--tests/auto/widgets/kernel/qicon/icons/testtheme/index.theme (renamed from tests/auto/gui/image/qicon/icons/testtheme/index.theme)0
-rw-r--r--tests/auto/widgets/kernel/qicon/icons/testtheme/scalable/actions/svg-only.svg (renamed from tests/auto/gui/image/qicon/icons/testtheme/scalable/actions/svg-only.svg)0
-rw-r--r--tests/auto/widgets/kernel/qicon/icons/themeparent/16x16/actions/address-book-new.png (renamed from tests/auto/gui/image/qicon/icons/themeparent/16x16/actions/address-book-new.png)bin796 -> 796 bytes
-rw-r--r--tests/auto/widgets/kernel/qicon/icons/themeparent/16x16/actions/appointment-new.png (renamed from tests/auto/gui/image/qicon/icons/themeparent/16x16/actions/appointment-new.png)bin897 -> 897 bytes
-rw-r--r--tests/auto/widgets/kernel/qicon/icons/themeparent/22x22/actions/address-book-new.png (renamed from tests/auto/gui/image/qicon/icons/themeparent/22x22/actions/address-book-new.png)bin924 -> 924 bytes
-rw-r--r--tests/auto/widgets/kernel/qicon/icons/themeparent/22x22/actions/appointment-new.png (renamed from tests/auto/gui/image/qicon/icons/themeparent/22x22/actions/appointment-new.png)bin1411 -> 1411 bytes
-rw-r--r--tests/auto/widgets/kernel/qicon/icons/themeparent/32x32/actions/address-book-new.png (renamed from tests/auto/gui/image/qicon/icons/themeparent/32x32/actions/address-book-new.png)bin1897 -> 1897 bytes
-rw-r--r--tests/auto/widgets/kernel/qicon/icons/themeparent/32x32/actions/appointment-new.png (renamed from tests/auto/gui/image/qicon/icons/themeparent/32x32/actions/appointment-new.png)bin2399 -> 2399 bytes
-rw-r--r--tests/auto/widgets/kernel/qicon/icons/themeparent/index.theme (renamed from tests/auto/gui/image/qicon/icons/themeparent/index.theme)0
-rw-r--r--tests/auto/widgets/kernel/qicon/icons/themeparent/scalable/actions/address-book-new.svg (renamed from tests/auto/gui/image/qicon/icons/themeparent/scalable/actions/address-book-new.svg)0
-rw-r--r--tests/auto/widgets/kernel/qicon/icons/themeparent/scalable/actions/appointment-new.svg (renamed from tests/auto/gui/image/qicon/icons/themeparent/scalable/actions/appointment-new.svg)0
-rw-r--r--tests/auto/widgets/kernel/qicon/image.png (renamed from tests/auto/gui/image/qicon/image.png)bin14743 -> 14743 bytes
-rw-r--r--tests/auto/widgets/kernel/qicon/qicon.pro (renamed from tests/auto/gui/image/qicon/qicon.pro)0
-rw-r--r--tests/auto/widgets/kernel/qicon/rect.png (renamed from tests/auto/gui/image/qicon/rect.png)bin175 -> 175 bytes
-rw-r--r--tests/auto/widgets/kernel/qicon/tst_qicon.cpp (renamed from tests/auto/gui/image/qicon/tst_qicon.cpp)0
-rw-r--r--tests/auto/widgets/kernel/qicon/tst_qicon.qrc (renamed from tests/auto/gui/image/qicon/tst_qicon.qrc)0
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp75
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro2
-rw-r--r--tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp30
-rw-r--r--tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp12
-rw-r--r--tests/auto/widgets/widgets/qmenubar/qmenubar.pro2
-rw-r--r--tests/auto/widgets/widgets/qtextedit/qtextedit.pro2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h2
-rw-r--r--tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp1
-rw-r--r--tests/benchmarks/gui/image/qimagereader/qimagereader.pro4
174 files changed, 1871 insertions, 804 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 63c4ca6a48..124af19799 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -13,6 +13,7 @@ SUBDIRS += \
concurrent \
other \
widgets \
+ printsupport \
cross_compile: SUBDIRS -= tools
!contains(QT_CONFIG, opengl): SUBDIRS -= opengl
diff --git a/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp b/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
index 971a6992ff..eb1faab94f 100644
--- a/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
+++ b/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
@@ -51,9 +51,6 @@ class tst_QtConcurrentFilter : public QObject
Q_OBJECT
private slots:
-#ifdef QT_NO_CONCURRENT_FILTER
- void initTestCase();
-#else
void filter();
void filtered();
void filteredReduced();
@@ -63,17 +60,8 @@ private slots:
#ifndef QT_NO_STL
void stlContainers();
#endif
-#endif
};
-#ifdef QT_NO_CONCURRENT_FILTER
-void tst_QtConcurrentFilter::initTestCase()
-{
- QSKIP("This test is skipped for gcc 3.x");
-}
-
-#else
-
void tst_QtConcurrentFilter::filter()
{
// functor
@@ -1537,7 +1525,5 @@ void tst_QtConcurrentFilter::stlContainers()
}
#endif
-#endif
-
QTEST_MAIN(tst_QtConcurrentFilter)
#include "tst_qtconcurrentfilter.moc"
diff --git a/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
index 960511d87b..35ee0be326 100644
--- a/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
+++ b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
@@ -59,9 +59,6 @@ class tst_QtConcurrentMap: public QObject
{
Q_OBJECT
private slots:
-#ifdef QT_NO_CONCURRENT_MAP
- void initTestCase()
-#else
void map();
void blocking_map();
void mapped();
@@ -82,17 +79,8 @@ private slots:
void stressTest();
public slots:
void throttling();
-#endif
};
-#ifdef QT_NO_CONCURRENT_FILTER
-void tst_QtConcurrentFilter::initTestCase()
-{
- QSKIP("This test is skipped for gcc 3.x");
-}
-
-#else
-
using namespace QtConcurrent;
void multiplyBy2Immutable(int x)
@@ -2420,7 +2408,5 @@ void tst_QtConcurrentMap::stressTest()
}
}
-#endif
-
QTEST_MAIN(tst_QtConcurrentMap)
#include "tst_qtconcurrentmap.moc"
diff --git a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
index 8fedaf427a..b3d76bef8a 100644
--- a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
+++ b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp
@@ -41,10 +41,12 @@
#include <QtTest/QtTest>
+#include <QtCore/qtypetraits.h>
class tst_QGlobal: public QObject
{
Q_OBJECT
+
private slots:
void qIsNull();
void for_each();
@@ -53,6 +55,7 @@ private slots:
void checkptr();
void qstaticassert();
void qConstructorFunction();
+ void isEnum();
};
void tst_QGlobal::qIsNull()
@@ -293,5 +296,124 @@ void tst_QGlobal::qConstructorFunction()
QCOMPARE(qConstructorFunctionValue, 123);
}
+struct isEnum_A {
+ int n_;
+};
+
+enum isEnum_B_Byte { isEnum_B_Byte_x = 63 };
+enum isEnum_B_Short { isEnum_B_Short_x = 1024 };
+enum isEnum_B_Int { isEnum_B_Int_x = 1 << 20 };
+
+union isEnum_C {};
+
+class isEnum_D {
+public:
+ operator int() const;
+};
+
+class isEnum_E {
+private:
+ operator int() const;
+};
+
+class isEnum_F {
+public:
+ enum AnEnum {};
+};
+
+#if defined (Q_COMPILER_CLASS_ENUM)
+enum class isEnum_G : qint64 {};
+#endif
+
+void tst_QGlobal::isEnum()
+{
+#if defined (Q_CC_MSVC)
+#define IS_ENUM_TRUE(x) (Q_IS_ENUM(x) == true)
+#define IS_ENUM_FALSE(x) (Q_IS_ENUM(x) == false)
+#else
+#define IS_ENUM_TRUE(x) (Q_IS_ENUM(x) == true && QtPrivate::is_enum<x>::value == true)
+#define IS_ENUM_FALSE(x) (Q_IS_ENUM(x) == false && QtPrivate::is_enum<x>::value == false)
+#endif
+
+ QVERIFY(IS_ENUM_TRUE(isEnum_B_Byte));
+ QVERIFY(IS_ENUM_TRUE(const isEnum_B_Byte));
+ QVERIFY(IS_ENUM_TRUE(volatile isEnum_B_Byte));
+ QVERIFY(IS_ENUM_TRUE(const volatile isEnum_B_Byte));
+
+ QVERIFY(IS_ENUM_TRUE(isEnum_B_Short));
+ QVERIFY(IS_ENUM_TRUE(const isEnum_B_Short));
+ QVERIFY(IS_ENUM_TRUE(volatile isEnum_B_Short));
+ QVERIFY(IS_ENUM_TRUE(const volatile isEnum_B_Short));
+
+ QVERIFY(IS_ENUM_TRUE(isEnum_B_Int));
+ QVERIFY(IS_ENUM_TRUE(const isEnum_B_Int));
+ QVERIFY(IS_ENUM_TRUE(volatile isEnum_B_Int));
+ QVERIFY(IS_ENUM_TRUE(const volatile isEnum_B_Int));
+
+ QVERIFY(IS_ENUM_TRUE(isEnum_F::AnEnum));
+ QVERIFY(IS_ENUM_TRUE(const isEnum_F::AnEnum));
+ QVERIFY(IS_ENUM_TRUE(volatile isEnum_F::AnEnum));
+ QVERIFY(IS_ENUM_TRUE(const volatile isEnum_F::AnEnum));
+
+ QVERIFY(IS_ENUM_FALSE(void));
+ QVERIFY(IS_ENUM_FALSE(isEnum_B_Byte &));
+ QVERIFY(IS_ENUM_FALSE(isEnum_B_Byte[1]));
+ QVERIFY(IS_ENUM_FALSE(const isEnum_B_Byte[1]));
+ QVERIFY(IS_ENUM_FALSE(isEnum_B_Byte[]));
+ QVERIFY(IS_ENUM_FALSE(int));
+ QVERIFY(IS_ENUM_FALSE(float));
+ QVERIFY(IS_ENUM_FALSE(isEnum_A));
+ QVERIFY(IS_ENUM_FALSE(isEnum_A *));
+ QVERIFY(IS_ENUM_FALSE(const isEnum_A));
+ QVERIFY(IS_ENUM_FALSE(isEnum_C));
+ QVERIFY(IS_ENUM_FALSE(isEnum_D));
+ QVERIFY(IS_ENUM_FALSE(isEnum_E));
+ QVERIFY(IS_ENUM_FALSE(void()));
+ QVERIFY(IS_ENUM_FALSE(void(*)()));
+ QVERIFY(IS_ENUM_FALSE(int isEnum_A::*));
+ QVERIFY(IS_ENUM_FALSE(void (isEnum_A::*)()));
+
+ QVERIFY(IS_ENUM_FALSE(size_t));
+ QVERIFY(IS_ENUM_FALSE(bool));
+ QVERIFY(IS_ENUM_FALSE(wchar_t));
+
+ QVERIFY(IS_ENUM_FALSE(char));
+ QVERIFY(IS_ENUM_FALSE(unsigned char));
+ QVERIFY(IS_ENUM_FALSE(short));
+ QVERIFY(IS_ENUM_FALSE(unsigned short));
+ QVERIFY(IS_ENUM_FALSE(int));
+ QVERIFY(IS_ENUM_FALSE(unsigned int));
+ QVERIFY(IS_ENUM_FALSE(long));
+ QVERIFY(IS_ENUM_FALSE(unsigned long));
+
+ QVERIFY(IS_ENUM_FALSE(qint8));
+ QVERIFY(IS_ENUM_FALSE(quint8));
+ QVERIFY(IS_ENUM_FALSE(qint16));
+ QVERIFY(IS_ENUM_FALSE(quint16));
+ QVERIFY(IS_ENUM_FALSE(qint32));
+ QVERIFY(IS_ENUM_FALSE(quint32));
+ QVERIFY(IS_ENUM_FALSE(qint64));
+ QVERIFY(IS_ENUM_FALSE(quint64));
+
+ QVERIFY(IS_ENUM_FALSE(void *));
+ QVERIFY(IS_ENUM_FALSE(int *));
+
+#if defined (Q_COMPILER_UNICODE_STRINGS)
+ QVERIFY(IS_ENUM_FALSE(char16_t));
+ QVERIFY(IS_ENUM_FALSE(char32_t));
+#endif
+
+#if defined (Q_COMPILER_CLASS_ENUM)
+ // Strongly type class enums are not handled by the
+ // fallback type traits implementation. Any compiler
+ // supported by Qt that supports C++0x class enums
+ // should also support the __is_enum intrinsic.
+ QVERIFY(Q_IS_ENUM(isEnum_G) == true);
+#endif
+
+#undef IS_ENUM_TRUE
+#undef IS_ENUM_FALSE
+}
+
QTEST_MAIN(tst_QGlobal)
#include "tst_qglobal.moc"
diff --git a/tests/auto/corelib/json/tst_qtjson.cpp b/tests/auto/corelib/json/tst_qtjson.cpp
index f35831c900..079ff6e76b 100644
--- a/tests/auto/corelib/json/tst_qtjson.cpp
+++ b/tests/auto/corelib/json/tst_qtjson.cpp
@@ -117,6 +117,9 @@ private Q_SLOTS:
void testCompactionError();
void parseUnicodeEscapes();
+
+ void assignObjects();
+ void assignArrays();
private:
QString testDataDir;
};
@@ -1774,5 +1777,35 @@ void TestQtJson::parseUnicodeEscapes()
QCOMPARE(array.first().toString(), result);
}
+void TestQtJson::assignObjects()
+{
+ const char *json =
+ "[ { \"Key\": 1 }, { \"Key\": 2 } ]";
+
+ QJsonDocument doc = QJsonDocument::fromJson(json);
+ QJsonArray array = doc.array();
+
+ QJsonObject object = array.at(0).toObject();
+ QCOMPARE(object.value("Key").toDouble(), 1.);
+
+ object = array.at(1).toObject();
+ QCOMPARE(object.value("Key").toDouble(), 2.);
+}
+
+void TestQtJson::assignArrays()
+{
+ const char *json =
+ "[ [ 1 ], [ 2 ] ]";
+
+ QJsonDocument doc = QJsonDocument::fromJson(json);
+ QJsonArray array = doc.array();
+
+ QJsonArray inner = array.at(0).toArray() ;
+ QCOMPARE(inner.at(0).toDouble(), 1.);
+
+ inner= array.at(1).toArray();
+ QCOMPARE(inner.at(0).toDouble(), 2.);
+}
+
QTEST_MAIN(TestQtJson)
#include "tst_qtjson.moc"
diff --git a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
index 572c2fdfd1..84d723ca61 100644
--- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
+++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
@@ -85,7 +85,7 @@ public:
void tst_QCoreApplication::sendEventsOnProcessEvents()
{
int argc = 1;
- char *argv[] = { "tst_qcoreapplication" };
+ char *argv[] = { const_cast<char*>("tst_qcoreapplication") };
QCoreApplication app(argc, argv);
EventSpy spy;
@@ -107,7 +107,7 @@ void tst_QCoreApplication::getSetCheck()
// Test the property
{
int argc = 1;
- char *argv[] = { "tst_qcoreapplication" };
+ char *argv[] = { const_cast<char*>("tst_qcoreapplication") };
QCoreApplication app(argc, argv);
QCOMPARE(app.property("applicationVersion").toString(), v);
}
@@ -119,7 +119,7 @@ void tst_QCoreApplication::getSetCheck()
void tst_QCoreApplication::qAppName()
{
int argc = 1;
- char *argv[] = { "tst_qcoreapplication" };
+ char *argv[] = { const_cast<char*>("tst_qcoreapplication") };
QCoreApplication app(argc, argv);
QVERIFY(!::qAppName().isEmpty());
}
@@ -131,7 +131,7 @@ void tst_QCoreApplication::argc()
#endif
{
int argc = 1;
- char *argv[] = { "tst_qcoreapplication" };
+ char *argv[] = { const_cast<char*>("tst_qcoreapplication") };
QCoreApplication app(argc, argv);
QCOMPARE(argc, 1);
QCOMPARE(app.arguments().count(), 1);
@@ -139,7 +139,10 @@ void tst_QCoreApplication::argc()
{
int argc = 4;
- char *argv[] = { "tst_qcoreapplication", "arg1", "arg2", "arg3" };
+ char *argv[] = { const_cast<char*>("tst_qcoreapplication"),
+ const_cast<char*>("arg1"),
+ const_cast<char*>("arg2"),
+ const_cast<char*>("arg3") };
QCoreApplication app(argc, argv);
QCOMPARE(argc, 4);
QCOMPARE(app.arguments().count(), 4);
@@ -155,7 +158,8 @@ void tst_QCoreApplication::argc()
{
int argc = 2;
- char *argv[] = { "tst_qcoreapplication", "-qmljsdebugger=port:3768,block" };
+ char *argv[] = { const_cast<char*>("tst_qcoreapplication"),
+ const_cast<char*>("-qmljsdebugger=port:3768,block") };
QCoreApplication app(argc, argv);
QCOMPARE(argc, 1);
QCOMPARE(app.arguments().count(), 1);
@@ -187,7 +191,7 @@ public:
void tst_QCoreApplication::postEvent()
{
int argc = 1;
- char *argv[] = { "tst_qcoreapplication" };
+ char *argv[] = { const_cast<char*>("tst_qcoreapplication") };
QCoreApplication app(argc, argv);
EventSpy spy;
@@ -272,7 +276,7 @@ void tst_QCoreApplication::postEvent()
void tst_QCoreApplication::removePostedEvents()
{
int argc = 1;
- char *argv[] = { "tst_qcoreapplication" };
+ char *argv[] = { const_cast<char*>("tst_qcoreapplication") };
QCoreApplication app(argc, argv);
EventSpy spy;
@@ -451,7 +455,7 @@ public:
void tst_QCoreApplication::deliverInDefinedOrder()
{
int argc = 1;
- char *argv[] = { "tst_qcoreapplication" };
+ char *argv[] = { const_cast<char*>("tst_qcoreapplication") };
QCoreApplication app(argc, argv);
DeliverInDefinedOrderObject obj(&app);
@@ -491,7 +495,7 @@ public:
void tst_QCoreApplication::globalPostedEventsCount()
{
int argc = 1;
- char *argv[] = { "tst_qcoreapplication" };
+ char *argv[] = { const_cast<char*>("tst_qcoreapplication") };
QCoreApplication app(argc, argv);
QCoreApplication::sendPostedEvents();
@@ -537,7 +541,7 @@ public:
void tst_QCoreApplication::processEventsAlwaysSendsPostedEvents()
{
int argc = 1;
- char *argv[] = { "tst_qcoreapplication" };
+ char *argv[] = { const_cast<char*>("tst_qcoreapplication") };
QCoreApplication app(argc, argv);
ProcessEventsAlwaysSendsPostedEventsObject object;
@@ -555,7 +559,7 @@ void tst_QCoreApplication::processEventsAlwaysSendsPostedEvents()
void tst_QCoreApplication::reexec()
{
int argc = 1;
- char *argv[] = { "tst_qcoreapplication" };
+ char *argv[] = { const_cast<char*>("tst_qcoreapplication") };
QCoreApplication app(argc, argv);
// exec once
@@ -570,7 +574,7 @@ void tst_QCoreApplication::reexec()
void tst_QCoreApplication::execAfterExit()
{
int argc = 1;
- char *argv[] = { "tst_qcoreapplication" };
+ char *argv[] = { const_cast<char*>("tst_qcoreapplication") };
QCoreApplication app(argc, argv);
app.exit(1);
@@ -581,7 +585,7 @@ void tst_QCoreApplication::execAfterExit()
void tst_QCoreApplication::eventLoopExecAfterExit()
{
int argc = 1;
- char *argv[] = { "tst_qcoreapplication" };
+ char *argv[] = { const_cast<char*>("tst_qcoreapplication") };
QCoreApplication app(argc, argv);
// exec once and exit
@@ -633,8 +637,7 @@ void tst_QCoreApplication::customEventDispatcher()
QVERIFY(!weak_ed.isNull());
{
int argc = 1;
- char *arg0 = "tst_qcoreapplication";
- char *argv[] = { arg0 };
+ char *argv[] = { const_cast<char*>("tst_qcoreapplication") };
QCoreApplication app(argc, argv);
// instantiating app should not overwrite the ED
QCOMPARE(QCoreApplication::eventDispatcher(), ed);
@@ -728,10 +731,12 @@ private slots:
QCOMPARE(privateClass->quitLockRef.load(), 2);
JobObject *job3 = new JobObject(job2);
+ Q_UNUSED(job3);
QCOMPARE(privateClass->quitLockRef.load(), 3);
JobObject *job4 = new JobObject(job2);
+ Q_UNUSED(job4);
QCOMPARE(privateClass->quitLockRef.load(), 4);
@@ -747,7 +752,7 @@ private slots:
void tst_QCoreApplication::testQuitLock()
{
int argc = 1;
- char *argv[] = { "tst_qcoreapplication" };
+ char *argv[] = { const_cast<char*>("tst_qcoreapplication") };
QCoreApplication app(argc, argv);
QuitTester tester;
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
index 84d28c7959..589b8385a1 100644
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -94,6 +94,7 @@ private slots:
void isRegistered();
void isRegisteredStaticLess_data();
void isRegisteredStaticLess();
+ void isEnum();
void registerStreamBuiltin();
void automaticTemplateRegistration();
};
@@ -322,17 +323,21 @@ void tst_QMetaType::normalizedTypes()
#define TYPENAME_DATA(MetaTypeName, MetaTypeId, RealType)\
QTest::newRow(#RealType) << QMetaType::MetaTypeName << #RealType;
-#define TYPENAME_DATA_ALIAS(MetaTypeName, MetaTypeId, AliasType, RealTypeString)\
- QTest::newRow(RealTypeString) << QMetaType::MetaTypeName << #AliasType;
-
void tst_QMetaType::typeName_data()
{
QTest::addColumn<QMetaType::Type>("aType");
QTest::addColumn<QString>("aTypeName");
QT_FOR_EACH_STATIC_TYPE(TYPENAME_DATA)
- QT_FOR_EACH_STATIC_ALIAS_TYPE(TYPENAME_DATA_ALIAS)
QTest::newRow("QMetaType::UnknownType") << QMetaType::UnknownType << static_cast<const char*>(0);
+
+ QTest::newRow("Whity<double>") << static_cast<QMetaType::Type>(::qMetaTypeId<Whity<double> >()) << QString::fromLatin1("Whity<double>");
+ QTest::newRow("Whity<int>") << static_cast<QMetaType::Type>(::qMetaTypeId<Whity<int> >()) << QString::fromLatin1("Whity<int>");
+ QTest::newRow("Testspace::Foo") << static_cast<QMetaType::Type>(::qMetaTypeId<TestSpace::Foo>()) << QString::fromLatin1("TestSpace::Foo");
+
+ QTest::newRow("-1") << QMetaType::Type(-1) << QString();
+ QTest::newRow("-124125534") << QMetaType::Type(-124125534) << QString();
+ QTest::newRow("124125534") << QMetaType::Type(124125534) << QString();
}
void tst_QMetaType::typeName()
@@ -759,6 +764,12 @@ QT_FOR_EACH_STATIC_CORE_POINTER(ADD_METATYPE_TEST_ROW)
QTest::newRow("QPair<P,C>") << ::qMetaTypeId<QPair<P,C> >() << false << true << false;
QTest::newRow("QPair<P,M>") << ::qMetaTypeId<QPair<P,M> >() << true << true << false;
QTest::newRow("QPair<P,P>") << ::qMetaTypeId<QPair<P,P> >() << true << false << false;
+
+ // invalid ids.
+ QTest::newRow("-1") << -1 << false << false << false;
+ QTest::newRow("-124125534") << -124125534 << false << false << false;
+ QTest::newRow("124125534") << 124125534 << false << false << false;
+
}
void tst_QMetaType::flags()
@@ -1053,6 +1064,39 @@ void tst_QMetaType::isRegistered()
QCOMPARE(QMetaType::isRegistered(typeId), registered);
}
+enum isEnumTest_Enum0 {};
+struct isEnumTest_Struct0 { enum A{}; };
+
+enum isEnumTest_Enum1 {};
+struct isEnumTest_Struct1 {};
+
+Q_DECLARE_METATYPE(isEnumTest_Struct1)
+Q_DECLARE_METATYPE(isEnumTest_Enum1)
+
+void tst_QMetaType::isEnum()
+{
+ int type0 = qRegisterMetaType<int>("int");
+ QVERIFY((QMetaType::typeFlags(type0) & QMetaType::IsEnumeration) == 0);
+
+ int type1 = qRegisterMetaType<isEnumTest_Enum0>("isEnumTest_Enum0");
+ QVERIFY((QMetaType::typeFlags(type1) & QMetaType::IsEnumeration) == QMetaType::IsEnumeration);
+
+ int type2 = qRegisterMetaType<isEnumTest_Struct0>("isEnumTest_Struct0");
+ QVERIFY((QMetaType::typeFlags(type2) & QMetaType::IsEnumeration) == 0);
+
+ int type3 = qRegisterMetaType<isEnumTest_Enum0 *>("isEnumTest_Enum0 *");
+ QVERIFY((QMetaType::typeFlags(type3) & QMetaType::IsEnumeration) == 0);
+
+ int type4 = qRegisterMetaType<isEnumTest_Struct0::A>("isEnumTest_Struct0::A");
+ QVERIFY((QMetaType::typeFlags(type4) & QMetaType::IsEnumeration) == QMetaType::IsEnumeration);
+
+ int type5 = ::qMetaTypeId<isEnumTest_Struct1>();
+ QVERIFY((QMetaType::typeFlags(type5) & QMetaType::IsEnumeration) == 0);
+
+ int type6 = ::qMetaTypeId<isEnumTest_Enum1>();
+ QVERIFY((QMetaType::typeFlags(type6) & QMetaType::IsEnumeration) == QMetaType::IsEnumeration);
+}
+
void tst_QMetaType::isRegisteredStaticLess_data()
{
isRegistered_data();
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
index c48a384e58..9c9c9be99b 100644
--- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -228,7 +228,7 @@ private slots:
void podUserType();
- void data_(); // data is virtual function in QtTestCase
+ void data();
void constData();
void saveLoadCustomTypes();
@@ -612,6 +612,12 @@ void tst_QVariant::canConvert()
QCOMPARE(val.canConvert(QVariant::Time), TimeCast);
QCOMPARE(val.canConvert(QVariant::UInt), UIntCast);
QCOMPARE(val.canConvert(QVariant::ULongLong), ULongLongCast);
+
+ // Invalid type ids
+ QCOMPARE(val.canConvert(-1), false);
+ QCOMPARE(val.canConvert(-23), false);
+ QCOMPARE(val.canConvert(-23876), false);
+ QCOMPARE(val.canConvert(23876), false);
}
void tst_QVariant::toInt_data()
@@ -2215,7 +2221,7 @@ void tst_QVariant::basicUserType()
QCOMPARE(v.toByteArray(), QByteArray("bar"));
}
-void tst_QVariant::data_()
+void tst_QVariant::data()
{
QVariant v;
diff --git a/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp b/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
index 0e1fa47a3e..a9fbde8037 100644
--- a/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
+++ b/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
@@ -73,10 +73,10 @@ public:
void run()
{
- mutex.lock();
- cond.wakeOne();
- cond.wait(&mutex);
- mutex.unlock();
+ mutex.lock();
+ cond.wakeOne();
+ cond.wait(&mutex);
+ mutex.unlock();
}
};
@@ -94,10 +94,10 @@ public:
void run()
{
- mutex->lock();
- started.wakeOne();
- cond->wait(mutex);
- mutex->unlock();
+ mutex->lock();
+ started.wakeOne();
+ cond->wait(mutex);
+ mutex->unlock();
}
};
@@ -112,10 +112,10 @@ public:
void run()
{
- readWriteLock.lockForWrite();
- cond.wakeOne();
- cond.wait(&readWriteLock);
- readWriteLock.unlock();
+ readWriteLock.lockForWrite();
+ cond.wakeOne();
+ cond.wait(&readWriteLock);
+ readWriteLock.unlock();
}
};
@@ -133,10 +133,10 @@ public:
void run()
{
- readWriteLock->lockForRead();
- started.wakeOne();
- cond->wait(readWriteLock);
- readWriteLock->unlock();
+ readWriteLock->lockForRead();
+ started.wakeOne();
+ cond->wait(readWriteLock);
+ readWriteLock->unlock();
}
};
@@ -144,80 +144,80 @@ void tst_QWaitCondition::wait_QMutex()
{
int x;
for (int i = 0; i < iterations; ++i) {
- {
- QMutex mutex;
- QWaitCondition cond;
-
- mutex.lock();
+ {
+ QMutex mutex;
+ QWaitCondition cond;
- cond.wakeOne();
- QVERIFY(!cond.wait(&mutex, 1));
-
- cond.wakeAll();
- QVERIFY(!cond.wait(&mutex, 1));
+ mutex.lock();
- mutex.unlock();
- }
+ cond.wakeOne();
+ QVERIFY(!cond.wait(&mutex, 1));
- {
- // test multiple threads waiting on separate wait conditions
- wait_QMutex_Thread_1 thread[ThreadCount];
+ cond.wakeAll();
+ QVERIFY(!cond.wait(&mutex, 1));
- for (x = 0; x < ThreadCount; ++x) {
- thread[x].mutex.lock();
- thread[x].start();
- // wait for thread to start
- QVERIFY(thread[x].cond.wait(&thread[x].mutex, 1000));
- thread[x].mutex.unlock();
+ mutex.unlock();
}
- for (x = 0; x < ThreadCount; ++x) {
- QVERIFY(thread[x].isRunning());
- QVERIFY(!thread[x].isFinished());
- }
+ {
+ // test multiple threads waiting on separate wait conditions
+ wait_QMutex_Thread_1 thread[ThreadCount];
- for (x = 0; x < ThreadCount; ++x) {
- thread[x].mutex.lock();
- thread[x].cond.wakeOne();
- thread[x].mutex.unlock();
- }
+ for (x = 0; x < ThreadCount; ++x) {
+ thread[x].mutex.lock();
+ thread[x].start();
+ // wait for thread to start
+ QVERIFY(thread[x].cond.wait(&thread[x].mutex, 1000));
+ thread[x].mutex.unlock();
+ }
- for (x = 0; x < ThreadCount; ++x) {
- QVERIFY(thread[x].wait(1000));
- }
- }
+ for (x = 0; x < ThreadCount; ++x) {
+ QVERIFY(thread[x].isRunning());
+ QVERIFY(!thread[x].isFinished());
+ }
- {
- // test multiple threads waiting on a wait condition
- QMutex mutex;
- QWaitCondition cond1, cond2;
- wait_QMutex_Thread_2 thread[ThreadCount];
+ for (x = 0; x < ThreadCount; ++x) {
+ thread[x].mutex.lock();
+ thread[x].cond.wakeOne();
+ thread[x].mutex.unlock();
+ }
- mutex.lock();
- for (x = 0; x < ThreadCount; ++x) {
- thread[x].mutex = &mutex;
- thread[x].cond = (x < ThreadCount / 2) ? &cond1 : &cond2;
- thread[x].start();
- // wait for thread to start
- QVERIFY(thread[x].started.wait(&mutex, 1000));
+ for (x = 0; x < ThreadCount; ++x) {
+ QVERIFY(thread[x].wait(1000));
+ }
}
- mutex.unlock();
- for (x = 0; x < ThreadCount; ++x) {
- QVERIFY(thread[x].isRunning());
- QVERIFY(!thread[x].isFinished());
- }
+ {
+ // test multiple threads waiting on a wait condition
+ QMutex mutex;
+ QWaitCondition cond1, cond2;
+ wait_QMutex_Thread_2 thread[ThreadCount];
+
+ mutex.lock();
+ for (x = 0; x < ThreadCount; ++x) {
+ thread[x].mutex = &mutex;
+ thread[x].cond = (x < ThreadCount / 2) ? &cond1 : &cond2;
+ thread[x].start();
+ // wait for thread to start
+ QVERIFY(thread[x].started.wait(&mutex, 1000));
+ }
+ mutex.unlock();
- mutex.lock();
- cond1.wakeAll();
- cond2.wakeAll();
- mutex.unlock();
+ for (x = 0; x < ThreadCount; ++x) {
+ QVERIFY(thread[x].isRunning());
+ QVERIFY(!thread[x].isFinished());
+ }
- for (x = 0; x < ThreadCount; ++x) {
- QVERIFY(thread[x].wait(1000));
+ mutex.lock();
+ cond1.wakeAll();
+ cond2.wakeAll();
+ mutex.unlock();
+
+ for (x = 0; x < ThreadCount; ++x) {
+ QVERIFY(thread[x].wait(1000));
+ }
}
}
- }
}
void tst_QWaitCondition::wait_QReadWriteLock()
@@ -263,96 +263,95 @@ void tst_QWaitCondition::wait_QReadWriteLock()
int x;
for (int i = 0; i < iterations; ++i) {
- {
- QReadWriteLock readWriteLock;
- QWaitCondition waitCondition;
+ {
+ QReadWriteLock readWriteLock;
+ QWaitCondition waitCondition;
- readWriteLock.lockForRead();
+ readWriteLock.lockForRead();
- waitCondition.wakeOne();
- QVERIFY(!waitCondition.wait(&readWriteLock, 1));
-
- waitCondition.wakeAll();
- QVERIFY(!waitCondition.wait(&readWriteLock, 1));
+ waitCondition.wakeOne();
+ QVERIFY(!waitCondition.wait(&readWriteLock, 1));
- readWriteLock.unlock();
- }
-
- {
- QReadWriteLock readWriteLock;
- QWaitCondition waitCondition;
+ waitCondition.wakeAll();
+ QVERIFY(!waitCondition.wait(&readWriteLock, 1));
- readWriteLock.lockForWrite();
+ readWriteLock.unlock();
+ }
- waitCondition.wakeOne();
- QVERIFY(!waitCondition.wait(&readWriteLock, 1));
+ {
+ QReadWriteLock readWriteLock;
+ QWaitCondition waitCondition;
- waitCondition.wakeAll();
- QVERIFY(!waitCondition.wait(&readWriteLock, 1));
+ readWriteLock.lockForWrite();
- readWriteLock.unlock();
- }
+ waitCondition.wakeOne();
+ QVERIFY(!waitCondition.wait(&readWriteLock, 1));
- {
- // test multiple threads waiting on separate wait conditions
- wait_QReadWriteLock_Thread_1 thread[ThreadCount];
+ waitCondition.wakeAll();
+ QVERIFY(!waitCondition.wait(&readWriteLock, 1));
- for (x = 0; x < ThreadCount; ++x) {
- thread[x].readWriteLock.lockForRead();
- thread[x].start();
- // wait for thread to start
- QVERIFY(thread[x].cond.wait(&thread[x].readWriteLock, 1000));
- thread[x].readWriteLock.unlock();
+ readWriteLock.unlock();
}
- for (x = 0; x < ThreadCount; ++x) {
- QVERIFY(thread[x].isRunning());
- QVERIFY(!thread[x].isFinished());
- }
+ {
+ // test multiple threads waiting on separate wait conditions
+ wait_QReadWriteLock_Thread_1 thread[ThreadCount];
- for (x = 0; x < ThreadCount; ++x) {
- thread[x].readWriteLock.lockForRead();
- thread[x].cond.wakeOne();
- thread[x].readWriteLock.unlock();
- }
+ for (x = 0; x < ThreadCount; ++x) {
+ thread[x].readWriteLock.lockForRead();
+ thread[x].start();
+ // wait for thread to start
+ QVERIFY(thread[x].cond.wait(&thread[x].readWriteLock, 1000));
+ thread[x].readWriteLock.unlock();
+ }
- for (x = 0; x < ThreadCount; ++x) {
- QVERIFY(thread[x].wait(1000));
- }
- }
+ for (x = 0; x < ThreadCount; ++x) {
+ QVERIFY(thread[x].isRunning());
+ QVERIFY(!thread[x].isFinished());
+ }
- {
- // test multiple threads waiting on a wait condition
- QReadWriteLock readWriteLock;
- QWaitCondition cond1, cond2;
- wait_QReadWriteLock_Thread_2 thread[ThreadCount];
+ for (x = 0; x < ThreadCount; ++x) {
+ thread[x].readWriteLock.lockForRead();
+ thread[x].cond.wakeOne();
+ thread[x].readWriteLock.unlock();
+ }
- readWriteLock.lockForWrite();
- for (x = 0; x < ThreadCount; ++x) {
- thread[x].readWriteLock = &readWriteLock;
- thread[x].cond = (x < ThreadCount / 2) ? &cond1 : &cond2;
- thread[x].start();
- // wait for thread to start
- QVERIFY(thread[x].started.wait(&readWriteLock, 1000));
+ for (x = 0; x < ThreadCount; ++x) {
+ QVERIFY(thread[x].wait(1000));
+ }
}
- readWriteLock.unlock();
- for (x = 0; x < ThreadCount; ++x) {
- QVERIFY(thread[x].isRunning());
- QVERIFY(!thread[x].isFinished());
- }
+ {
+ // test multiple threads waiting on a wait condition
+ QReadWriteLock readWriteLock;
+ QWaitCondition cond1, cond2;
+ wait_QReadWriteLock_Thread_2 thread[ThreadCount];
+
+ readWriteLock.lockForWrite();
+ for (x = 0; x < ThreadCount; ++x) {
+ thread[x].readWriteLock = &readWriteLock;
+ thread[x].cond = (x < ThreadCount / 2) ? &cond1 : &cond2;
+ thread[x].start();
+ // wait for thread to start
+ QVERIFY(thread[x].started.wait(&readWriteLock, 1000));
+ }
+ readWriteLock.unlock();
- readWriteLock.lockForWrite();
- cond1.wakeAll();
- cond2.wakeAll();
- readWriteLock.unlock();
+ for (x = 0; x < ThreadCount; ++x) {
+ QVERIFY(thread[x].isRunning());
+ QVERIFY(!thread[x].isFinished());
+ }
- for (x = 0; x < ThreadCount; ++x) {
- QVERIFY(thread[x].wait(1000));
+ readWriteLock.lockForWrite();
+ cond1.wakeAll();
+ cond2.wakeAll();
+ readWriteLock.unlock();
+
+ for (x = 0; x < ThreadCount; ++x) {
+ QVERIFY(thread[x].wait(1000));
+ }
}
}
- }
-
}
class wake_Thread : public QThread
@@ -375,14 +374,14 @@ public:
void run()
{
- mutex->lock();
- ++count;
+ mutex->lock();
+ ++count;
dummy.wakeOne(); // this wakeup should be lost
- started.wakeOne();
+ started.wakeOne();
dummy.wakeAll(); // this one too
- cond->wait(mutex);
+ cond->wait(mutex);
--count;
- mutex->unlock();
+ mutex->unlock();
}
};
@@ -408,14 +407,14 @@ public:
void run()
{
- readWriteLock->lockForWrite();
- ++count;
+ readWriteLock->lockForWrite();
+ ++count;
dummy.wakeOne(); // this wakeup should be lost
started.wakeOne();
dummy.wakeAll(); // this one too
- cond->wait(readWriteLock);
+ cond->wait(readWriteLock);
--count;
- readWriteLock->unlock();
+ readWriteLock->unlock();
}
};
@@ -426,264 +425,264 @@ void tst_QWaitCondition::wakeOne()
int x;
// wake up threads, one at a time
for (int i = 0; i < iterations; ++i) {
- QMutex mutex;
- QWaitCondition cond;
-
- // QMutex
- wake_Thread thread[ThreadCount];
- bool thread_exited[ThreadCount];
-
- mutex.lock();
- for (x = 0; x < ThreadCount; ++x) {
- thread[x].mutex = &mutex;
- thread[x].cond = &cond;
- thread_exited[x] = false;
- thread[x].start();
- // wait for thread to start
- QVERIFY(thread[x].started.wait(&mutex, 1000));
- // make sure wakeups are not queued... if nothing is
- // waiting at the time of the wakeup, nothing happens
- QVERIFY(!thread[x].dummy.wait(&mutex, 1));
- }
- mutex.unlock();
+ QMutex mutex;
+ QWaitCondition cond;
- QCOMPARE(wake_Thread::count, ThreadCount);
+ // QMutex
+ wake_Thread thread[ThreadCount];
+ bool thread_exited[ThreadCount];
- // wake up threads one at a time
- for (x = 0; x < ThreadCount; ++x) {
mutex.lock();
- cond.wakeOne();
- QVERIFY(!cond.wait(&mutex, COND_WAIT_TIME));
- QVERIFY(!thread[x].dummy.wait(&mutex, 1));
+ for (x = 0; x < ThreadCount; ++x) {
+ thread[x].mutex = &mutex;
+ thread[x].cond = &cond;
+ thread_exited[x] = false;
+ thread[x].start();
+ // wait for thread to start
+ QVERIFY(thread[x].started.wait(&mutex, 1000));
+ // make sure wakeups are not queued... if nothing is
+ // waiting at the time of the wakeup, nothing happens
+ QVERIFY(!thread[x].dummy.wait(&mutex, 1));
+ }
mutex.unlock();
- int exited = 0;
- for (int y = 0; y < ThreadCount; ++y) {
- if (thread_exited[y])
- continue;
- if (thread[y].wait(exited > 0 ? 10 : 1000)) {
- thread_exited[y] = true;
- ++exited;
- }
- }
+ QCOMPARE(wake_Thread::count, ThreadCount);
- QCOMPARE(exited, 1);
- QCOMPARE(wake_Thread::count, ThreadCount - (x + 1));
- }
+ // wake up threads one at a time
+ for (x = 0; x < ThreadCount; ++x) {
+ mutex.lock();
+ cond.wakeOne();
+ QVERIFY(!cond.wait(&mutex, COND_WAIT_TIME));
+ QVERIFY(!thread[x].dummy.wait(&mutex, 1));
+ mutex.unlock();
+
+ int exited = 0;
+ for (int y = 0; y < ThreadCount; ++y) {
+ if (thread_exited[y])
+ continue;
+ if (thread[y].wait(exited > 0 ? 10 : 1000)) {
+ thread_exited[y] = true;
+ ++exited;
+ }
+ }
- QCOMPARE(wake_Thread::count, 0);
+ QCOMPARE(exited, 1);
+ QCOMPARE(wake_Thread::count, ThreadCount - (x + 1));
+ }
- // QReadWriteLock
- QReadWriteLock readWriteLock;
- wake_Thread_2 rwthread[ThreadCount];
-
- readWriteLock.lockForWrite();
- for (x = 0; x < ThreadCount; ++x) {
- rwthread[x].readWriteLock = &readWriteLock;
- rwthread[x].cond = &cond;
- thread_exited[x] = false;
- rwthread[x].start();
- // wait for thread to start
- QVERIFY(rwthread[x].started.wait(&readWriteLock, 1000));
- // make sure wakeups are not queued... if nothing is
- // waiting at the time of the wakeup, nothing happens
- QVERIFY(!rwthread[x].dummy.wait(&readWriteLock, 1));
- }
- readWriteLock.unlock();
+ QCOMPARE(wake_Thread::count, 0);
- QCOMPARE(wake_Thread_2::count, ThreadCount);
+ // QReadWriteLock
+ QReadWriteLock readWriteLock;
+ wake_Thread_2 rwthread[ThreadCount];
- // wake up threads one at a time
- for (x = 0; x < ThreadCount; ++x) {
readWriteLock.lockForWrite();
- cond.wakeOne();
- QVERIFY(!cond.wait(&readWriteLock, COND_WAIT_TIME));
- QVERIFY(!rwthread[x].dummy.wait(&readWriteLock, 1));
+ for (x = 0; x < ThreadCount; ++x) {
+ rwthread[x].readWriteLock = &readWriteLock;
+ rwthread[x].cond = &cond;
+ thread_exited[x] = false;
+ rwthread[x].start();
+ // wait for thread to start
+ QVERIFY(rwthread[x].started.wait(&readWriteLock, 1000));
+ // make sure wakeups are not queued... if nothing is
+ // waiting at the time of the wakeup, nothing happens
+ QVERIFY(!rwthread[x].dummy.wait(&readWriteLock, 1));
+ }
readWriteLock.unlock();
- int exited = 0;
- for (int y = 0; y < ThreadCount; ++y) {
- if (thread_exited[y])
- continue;
- if (rwthread[y].wait(exited > 0 ? 10 : 1000)) {
- thread_exited[y] = true;
- ++exited;
+ QCOMPARE(wake_Thread_2::count, ThreadCount);
+
+ // wake up threads one at a time
+ for (x = 0; x < ThreadCount; ++x) {
+ readWriteLock.lockForWrite();
+ cond.wakeOne();
+ QVERIFY(!cond.wait(&readWriteLock, COND_WAIT_TIME));
+ QVERIFY(!rwthread[x].dummy.wait(&readWriteLock, 1));
+ readWriteLock.unlock();
+
+ int exited = 0;
+ for (int y = 0; y < ThreadCount; ++y) {
+ if (thread_exited[y])
+ continue;
+ if (rwthread[y].wait(exited > 0 ? 10 : 1000)) {
+ thread_exited[y] = true;
+ ++exited;
+ }
}
- }
- QCOMPARE(exited, 1);
- QCOMPARE(wake_Thread_2::count, ThreadCount - (x + 1));
- }
+ QCOMPARE(exited, 1);
+ QCOMPARE(wake_Thread_2::count, ThreadCount - (x + 1));
+ }
- QCOMPARE(wake_Thread_2::count, 0);
+ QCOMPARE(wake_Thread_2::count, 0);
}
// wake up threads, two at a time
for (int i = 0; i < iterations; ++i) {
- QMutex mutex;
- QWaitCondition cond;
+ QMutex mutex;
+ QWaitCondition cond;
// QMutex
- wake_Thread thread[ThreadCount];
- bool thread_exited[ThreadCount];
-
- mutex.lock();
- for (x = 0; x < ThreadCount; ++x) {
- thread[x].mutex = &mutex;
- thread[x].cond = &cond;
- thread_exited[x] = false;
- thread[x].start();
- // wait for thread to start
- QVERIFY(thread[x].started.wait(&mutex, 1000));
- // make sure wakeups are not queued... if nothing is
- // waiting at the time of the wakeup, nothing happens
- QVERIFY(!thread[x].dummy.wait(&mutex, 1));
- }
- mutex.unlock();
-
- QCOMPARE(wake_Thread::count, ThreadCount);
+ wake_Thread thread[ThreadCount];
+ bool thread_exited[ThreadCount];
- // wake up threads one at a time
- for (x = 0; x < ThreadCount; x += 2) {
mutex.lock();
- cond.wakeOne();
- cond.wakeOne();
- QVERIFY(!cond.wait(&mutex, COND_WAIT_TIME));
- QVERIFY(!thread[x].dummy.wait(&mutex, 1));
- QVERIFY(!thread[x + 1].dummy.wait(&mutex, 1));
+ for (x = 0; x < ThreadCount; ++x) {
+ thread[x].mutex = &mutex;
+ thread[x].cond = &cond;
+ thread_exited[x] = false;
+ thread[x].start();
+ // wait for thread to start
+ QVERIFY(thread[x].started.wait(&mutex, 1000));
+ // make sure wakeups are not queued... if nothing is
+ // waiting at the time of the wakeup, nothing happens
+ QVERIFY(!thread[x].dummy.wait(&mutex, 1));
+ }
mutex.unlock();
- int exited = 0;
- for (int y = 0; y < ThreadCount; ++y) {
- if (thread_exited[y])
- continue;
- if (thread[y].wait(exited > 0 ? 10 : 1000)) {
- thread_exited[y] = true;
- ++exited;
+ QCOMPARE(wake_Thread::count, ThreadCount);
+
+ // wake up threads one at a time
+ for (x = 0; x < ThreadCount; x += 2) {
+ mutex.lock();
+ cond.wakeOne();
+ cond.wakeOne();
+ QVERIFY(!cond.wait(&mutex, COND_WAIT_TIME));
+ QVERIFY(!thread[x].dummy.wait(&mutex, 1));
+ QVERIFY(!thread[x + 1].dummy.wait(&mutex, 1));
+ mutex.unlock();
+
+ int exited = 0;
+ for (int y = 0; y < ThreadCount; ++y) {
+ if (thread_exited[y])
+ continue;
+ if (thread[y].wait(exited > 0 ? 10 : 1000)) {
+ thread_exited[y] = true;
+ ++exited;
+ }
}
- }
- QCOMPARE(exited, 2);
- QCOMPARE(wake_Thread::count, ThreadCount - (x + 2));
- }
+ QCOMPARE(exited, 2);
+ QCOMPARE(wake_Thread::count, ThreadCount - (x + 2));
+ }
- QCOMPARE(wake_Thread::count, 0);
+ QCOMPARE(wake_Thread::count, 0);
// QReadWriteLock
QReadWriteLock readWriteLock;
wake_Thread_2 rwthread[ThreadCount];
- readWriteLock.lockForWrite();
- for (x = 0; x < ThreadCount; ++x) {
- rwthread[x].readWriteLock = &readWriteLock;
- rwthread[x].cond = &cond;
- thread_exited[x] = false;
- rwthread[x].start();
- // wait for thread to start
- QVERIFY(rwthread[x].started.wait(&readWriteLock, 1000));
- // make sure wakeups are not queued... if nothing is
- // waiting at the time of the wakeup, nothing happens
- QVERIFY(!rwthread[x].dummy.wait(&readWriteLock, 1));
- }
- readWriteLock.unlock();
-
- QCOMPARE(wake_Thread_2::count, ThreadCount);
-
- // wake up threads one at a time
- for (x = 0; x < ThreadCount; x += 2) {
readWriteLock.lockForWrite();
- cond.wakeOne();
- cond.wakeOne();
- QVERIFY(!cond.wait(&readWriteLock, COND_WAIT_TIME));
- QVERIFY(!rwthread[x].dummy.wait(&readWriteLock, 1));
- QVERIFY(!rwthread[x + 1].dummy.wait(&readWriteLock, 1));
+ for (x = 0; x < ThreadCount; ++x) {
+ rwthread[x].readWriteLock = &readWriteLock;
+ rwthread[x].cond = &cond;
+ thread_exited[x] = false;
+ rwthread[x].start();
+ // wait for thread to start
+ QVERIFY(rwthread[x].started.wait(&readWriteLock, 1000));
+ // make sure wakeups are not queued... if nothing is
+ // waiting at the time of the wakeup, nothing happens
+ QVERIFY(!rwthread[x].dummy.wait(&readWriteLock, 1));
+ }
readWriteLock.unlock();
- int exited = 0;
- for (int y = 0; y < ThreadCount; ++y) {
- if (thread_exited[y])
- continue;
- if (rwthread[y].wait(exited > 0 ? 10 : 1000)) {
- thread_exited[y] = true;
- ++exited;
+ QCOMPARE(wake_Thread_2::count, ThreadCount);
+
+ // wake up threads one at a time
+ for (x = 0; x < ThreadCount; x += 2) {
+ readWriteLock.lockForWrite();
+ cond.wakeOne();
+ cond.wakeOne();
+ QVERIFY(!cond.wait(&readWriteLock, COND_WAIT_TIME));
+ QVERIFY(!rwthread[x].dummy.wait(&readWriteLock, 1));
+ QVERIFY(!rwthread[x + 1].dummy.wait(&readWriteLock, 1));
+ readWriteLock.unlock();
+
+ int exited = 0;
+ for (int y = 0; y < ThreadCount; ++y) {
+ if (thread_exited[y])
+ continue;
+ if (rwthread[y].wait(exited > 0 ? 10 : 1000)) {
+ thread_exited[y] = true;
+ ++exited;
+ }
}
+
+ QCOMPARE(exited, 2);
+ QCOMPARE(wake_Thread_2::count, ThreadCount - (x + 2));
}
- QCOMPARE(exited, 2);
- QCOMPARE(wake_Thread_2::count, ThreadCount - (x + 2));
+ QCOMPARE(wake_Thread_2::count, 0);
}
-
- QCOMPARE(wake_Thread_2::count, 0);
-}
}
void tst_QWaitCondition::wakeAll()
{
int x;
for (int i = 0; i < iterations; ++i) {
- QMutex mutex;
- QWaitCondition cond;
+ QMutex mutex;
+ QWaitCondition cond;
- // QMutex
- wake_Thread thread[ThreadCount];
+ // QMutex
+ wake_Thread thread[ThreadCount];
- mutex.lock();
- for (x = 0; x < ThreadCount; ++x) {
- thread[x].mutex = &mutex;
- thread[x].cond = &cond;
- thread[x].start();
- // wait for thread to start
- QVERIFY(thread[x].started.wait(&mutex, 1000));
- }
- mutex.unlock();
+ mutex.lock();
+ for (x = 0; x < ThreadCount; ++x) {
+ thread[x].mutex = &mutex;
+ thread[x].cond = &cond;
+ thread[x].start();
+ // wait for thread to start
+ QVERIFY(thread[x].started.wait(&mutex, 1000));
+ }
+ mutex.unlock();
- QCOMPARE(wake_Thread::count, ThreadCount);
+ QCOMPARE(wake_Thread::count, ThreadCount);
- // wake up all threads at once
- mutex.lock();
- cond.wakeAll();
- QVERIFY(!cond.wait(&mutex, COND_WAIT_TIME));
- mutex.unlock();
+ // wake up all threads at once
+ mutex.lock();
+ cond.wakeAll();
+ QVERIFY(!cond.wait(&mutex, COND_WAIT_TIME));
+ mutex.unlock();
- int exited = 0;
- for (x = 0; x < ThreadCount; ++x) {
- if (thread[x].wait(1000))
- ++exited;
- }
+ int exited = 0;
+ for (x = 0; x < ThreadCount; ++x) {
+ if (thread[x].wait(1000))
+ ++exited;
+ }
- QCOMPARE(exited, ThreadCount);
- QCOMPARE(wake_Thread::count, 0);
+ QCOMPARE(exited, ThreadCount);
+ QCOMPARE(wake_Thread::count, 0);
- // QReadWriteLock
- QReadWriteLock readWriteLock;
- wake_Thread_2 rwthread[ThreadCount];
-
- readWriteLock.lockForWrite();
- for (x = 0; x < ThreadCount; ++x) {
- rwthread[x].readWriteLock = &readWriteLock;
- rwthread[x].cond = &cond;
- rwthread[x].start();
- // wait for thread to start
- QVERIFY(rwthread[x].started.wait(&readWriteLock, 1000));
- }
- readWriteLock.unlock();
+ // QReadWriteLock
+ QReadWriteLock readWriteLock;
+ wake_Thread_2 rwthread[ThreadCount];
- QCOMPARE(wake_Thread_2::count, ThreadCount);
+ readWriteLock.lockForWrite();
+ for (x = 0; x < ThreadCount; ++x) {
+ rwthread[x].readWriteLock = &readWriteLock;
+ rwthread[x].cond = &cond;
+ rwthread[x].start();
+ // wait for thread to start
+ QVERIFY(rwthread[x].started.wait(&readWriteLock, 1000));
+ }
+ readWriteLock.unlock();
- // wake up all threads at once
- readWriteLock.lockForWrite();
- cond.wakeAll();
- QVERIFY(!cond.wait(&readWriteLock, COND_WAIT_TIME));
- readWriteLock.unlock();
+ QCOMPARE(wake_Thread_2::count, ThreadCount);
- exited = 0;
- for (x = 0; x < ThreadCount; ++x) {
- if (rwthread[x].wait(1000))
- ++exited;
- }
+ // wake up all threads at once
+ readWriteLock.lockForWrite();
+ cond.wakeAll();
+ QVERIFY(!cond.wait(&readWriteLock, COND_WAIT_TIME));
+ readWriteLock.unlock();
+
+ exited = 0;
+ for (x = 0; x < ThreadCount; ++x) {
+ if (rwthread[x].wait(1000))
+ ++exited;
+ }
- QCOMPARE(exited, ThreadCount);
- QCOMPARE(wake_Thread_2::count, 0);
+ QCOMPARE(exited, ThreadCount);
+ QCOMPARE(wake_Thread_2::count, 0);
}
}
diff --git a/tests/auto/corelib/tools/qlist/tst_qlist.cpp b/tests/auto/corelib/tools/qlist/tst_qlist.cpp
index 3baa47f013..c883c1c5f6 100644
--- a/tests/auto/corelib/tools/qlist/tst_qlist.cpp
+++ b/tests/auto/corelib/tools/qlist/tst_qlist.cpp
@@ -43,12 +43,6 @@
#include <QtTest/QtTest>
#include <QList>
-/*!
- \class tst_QVector
- \internal
- \since 4.5
- \brief Test Qt's class QList.
- */
class tst_QList : public QObject
{
Q_OBJECT
diff --git a/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp b/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp
index 72157c0536..a4c04d6207 100644
--- a/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp
+++ b/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp
@@ -95,8 +95,13 @@ bool operator==(const QRegularExpressionMatch &rem, const Match &m)
}
Q_FOREACH (const QString &name, m.namedCaptured.keys()) {
- if (rem.captured(name) != m.namedCaptured.value(name))
+ QString remCaptured = rem.captured(name);
+ QString mCaptured = m.namedCaptured.value(name);
+ if (remCaptured != mCaptured
+ || remCaptured.isNull() != mCaptured.isNull()
+ || remCaptured.isEmpty() != mCaptured.isEmpty()) {
return false;
+ }
}
}
@@ -571,6 +576,32 @@ void tst_QRegularExpression::normalMatch_data()
<< QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption)
<< m;
+ // non existing names for capturing groups
+ m.clear();
+ m.isValid = true; m.hasMatch = true;
+ m.captured << "a string" << "a" << "string";
+ m.namedCaptured["article"] = "a";
+ m.namedCaptured["noun"] = "string";
+ m.namedCaptured["nonexisting1"] = QString();
+ m.namedCaptured["nonexisting2"] = QString();
+ m.namedCaptured["nonexisting3"] = QString();
+ QTest::newRow("match10") << QRegularExpression("(?<article>\\w+) (?<noun>\\w+)")
+ << "a string"
+ << 0
+ << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption)
+ << m;
+
+ m.clear();
+ m.isValid = true; m.hasMatch = true;
+ m.captured << "" << "";
+ m.namedCaptured["digits"] = ""; // empty VS null
+ m.namedCaptured["nonexisting"] = QString();
+ QTest::newRow("match11") << QRegularExpression("(?<digits>\\d*)")
+ << "abcde"
+ << 0
+ << QRegularExpression::MatchOptions(QRegularExpression::NoMatchOption)
+ << m;
+
// ***
m.clear();
@@ -1196,3 +1227,55 @@ void tst_QRegularExpression::captureCount()
if (!re.isValid())
QCOMPARE(re.captureCount(), -1);
}
+
+void tst_QRegularExpression::pcreJitStackUsage_data()
+{
+ QTest::addColumn<QString>("pattern");
+ QTest::addColumn<QString>("subject");
+ // these patterns cause enough backtrack (or even infinite recursion)
+ // in the regexp engine, so that JIT requests more memory.
+ QTest::newRow("jitstack01") << "(?(R)a*(?1)|((?R))b)" << "aaaabcde";
+ QTest::newRow("jitstack02") << "(?(R)a*(?1)|((?R))b)" << "aaaaaaabcde";
+}
+
+void tst_QRegularExpression::pcreJitStackUsage()
+{
+ QFETCH(QString, pattern);
+ QFETCH(QString, subject);
+
+ QRegularExpression re(pattern);
+ QVERIFY(re.isValid());
+ QRegularExpressionMatch match = re.match(subject);
+ consistencyCheck(match);
+ QRegularExpressionMatchIterator iterator = re.globalMatch(subject);
+ consistencyCheck(iterator);
+ while (iterator.hasNext()) {
+ match = iterator.next();
+ consistencyCheck(match);
+ }
+}
+
+void tst_QRegularExpression::regularExpressionMatch_data()
+{
+ QTest::addColumn<QString>("pattern");
+ QTest::addColumn<QString>("subject");
+
+ QTest::newRow("validity01") << "(?<digits>\\d+)" << "1234 abcd";
+ QTest::newRow("validity02") << "(?<digits>\\d+) (?<alpha>\\w+)" << "1234 abcd";
+}
+
+void tst_QRegularExpression::regularExpressionMatch()
+{
+ QFETCH(QString, pattern);
+ QFETCH(QString, subject);
+
+ QRegularExpression re(pattern);
+ QVERIFY(re.isValid());
+ QRegularExpressionMatch match = re.match(subject);
+ consistencyCheck(match);
+ QCOMPARE(match.captured("non-existing").isNull(), true);
+ QTest::ignoreMessage(QtWarningMsg, "QRegularExpressionMatch::captured: empty capturing group name passed");
+ QCOMPARE(match.captured("").isNull(), true);
+ QTest::ignoreMessage(QtWarningMsg, "QRegularExpressionMatch::captured: empty capturing group name passed");
+ QCOMPARE(match.captured(QString()).isNull(), true);
+}
diff --git a/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.h b/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.h
index 1a703a8f92..72a19199fd 100644
--- a/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.h
+++ b/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.h
@@ -71,6 +71,10 @@ private slots:
void operatoreq();
void captureCount_data();
void captureCount();
+ void pcreJitStackUsage_data();
+ void pcreJitStackUsage();
+ void regularExpressionMatch_data();
+ void regularExpressionMatch();
private:
void provideRegularExpressions();
diff --git a/tests/auto/gui/image/image.pro b/tests/auto/gui/image/image.pro
index fa8f8df29d..5a03063f47 100644
--- a/tests/auto/gui/image/image.pro
+++ b/tests/auto/gui/image/image.pro
@@ -5,11 +5,9 @@ SUBDIRS=\
qpixmap \
qpixmapcache \
qimage \
- qpixmapfilter \
qimageiohandler \
qimagewriter \
qmovie \
- qicon \
qpicture \
!contains(QT_CONFIG, private_tests): SUBDIRS -= \
diff --git a/tests/auto/gui/image/qimagereader/qimagereader.pro b/tests/auto/gui/image/qimagereader/qimagereader.pro
index 14d23f05ba..7686643b3a 100644
--- a/tests/auto/gui/image/qimagereader/qimagereader.pro
+++ b/tests/auto/gui/image/qimagereader/qimagereader.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
TARGET = tst_qimagereader
SOURCES += tst_qimagereader.cpp
MOC_DIR=tmp
-QT += widgets widgets-private core-private gui-private network testlib
+QT += core-private gui-private network testlib
RESOURCES += qimagereader.qrc
win32-msvc:QMAKE_CXXFLAGS -= -Zm200
diff --git a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
index 6f6662a80f..876d69ea1c 100644
--- a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
@@ -48,7 +48,6 @@
#include <QImage>
#include <QImageReader>
#include <QImageWriter>
-#include <QLabel>
#include <QPixmap>
#include <QSet>
#include <QTcpSocket>
diff --git a/tests/auto/gui/image/qimagewriter/qimagewriter.pro b/tests/auto/gui/image/qimagewriter/qimagewriter.pro
index b6c80b8d62..f77ff0659b 100644
--- a/tests/auto/gui/image/qimagewriter/qimagewriter.pro
+++ b/tests/auto/gui/image/qimagewriter/qimagewriter.pro
@@ -1,6 +1,6 @@
CONFIG += testcase
TARGET = tst_qimagewriter
-QT += widgets testlib
+QT += testlib
SOURCES += tst_qimagewriter.cpp
MOC_DIR=tmp
win32-msvc:QMAKE_CXXFLAGS -= -Zm200
diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
index ad9da27c7e..932d652b69 100644
--- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
+++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp
@@ -48,7 +48,6 @@
#include <QImage>
#include <QImageReader>
#include <QImageWriter>
-#include <QLabel>
#include <QPainter>
#include <QSet>
diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
index 563baef486..c7652e445f 100644
--- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
@@ -48,7 +48,6 @@
#include <qmatrix.h>
#include <qdesktopwidget.h>
#include <qpaintengine.h>
-#include <qtreewidget.h>
#include <qsplashscreen.h>
#include <qplatformpixmap_qpa.h>
@@ -111,7 +110,6 @@ private slots:
void setGetMask();
void cacheKey();
void drawBitmap();
- void grabWidget();
void grabWindow();
void isNull();
void task_246446();
@@ -718,47 +716,6 @@ void tst_QPixmap::drawBitmap()
QVERIFY(lenientCompare(pixmap, expected));
}
-void tst_QPixmap::grabWidget()
-{
- for (int opaque = 0; opaque < 2; ++opaque) {
- QWidget widget;
- QImage image(128, 128, opaque ? QImage::Format_RGB32 : QImage::Format_ARGB32_Premultiplied);
- for (int row = 0; row < image.height(); ++row) {
- QRgb *line = reinterpret_cast<QRgb *>(image.scanLine(row));
- for (int col = 0; col < image.width(); ++col)
- line[col] = qRgba(rand() & 255, row, col, opaque ? 255 : 127);
- }
-
- QPalette pal = widget.palette();
- pal.setBrush(QPalette::Window, QBrush(image));
- widget.setPalette(pal);
- widget.resize(128, 128);
-
- QPixmap expected(64, 64);
- if (!opaque)
- expected.fill(Qt::transparent);
-
- QPainter p(&expected);
- p.translate(-64, -64);
- p.drawTiledPixmap(0, 0, 128, 128, pal.brush(QPalette::Window).texture(), 0, 0);
- p.end();
-
- QPixmap actual = QPixmap::grabWidget(&widget, QRect(64, 64, 64, 64));
- QVERIFY(lenientCompare(actual, expected));
-
- actual = QPixmap::grabWidget(&widget, 64, 64);
- QVERIFY(lenientCompare(actual, expected));
-
- // Make sure a widget that is not yet shown is grabbed correctly.
- QTreeWidget widget2;
- actual = QPixmap::grabWidget(&widget2);
- widget2.show();
- expected = QPixmap::grabWidget(&widget2);
-
- QVERIFY(lenientCompare(actual, expected));
- }
-}
-
void tst_QPixmap::grabWindow()
{
// ### fixme: Check platforms
diff --git a/tests/auto/gui/kernel/qdrag/qdrag.pro b/tests/auto/gui/kernel/qdrag/qdrag.pro
index 0173b57215..ac3fde8028 100644
--- a/tests/auto/gui/kernel/qdrag/qdrag.pro
+++ b/tests/auto/gui/kernel/qdrag/qdrag.pro
@@ -4,7 +4,7 @@
CONFIG += testcase
TARGET = tst_qdrag
-QT += widgets testlib
+QT += testlib
SOURCES += tst_qdrag.cpp
diff --git a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp
index 9d138f6a2e..a9f9c8db08 100644
--- a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp
+++ b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.cpp
@@ -40,13 +40,12 @@
****************************************************************************/
#include <QtGui>
-#include <QApplication>
#include <QEvent>
-struct MyApplication : public QApplication
+struct MyApplication : public QGuiApplication
{
MyApplication(int& argc, char** argv)
- : QApplication(argc, argv)
+ : QGuiApplication(argc, argv)
{}
bool event(QEvent * event)
@@ -59,7 +58,7 @@ struct MyApplication : public QApplication
file.write(QByteArray("+external"));
return true;
} else {
- return QApplication::event(event);
+ return QGuiApplication::event(event);
}
}
};
diff --git a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.pro b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.pro
index 7de7b2ec57..b84ff760ca 100644
--- a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.pro
+++ b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.pro
@@ -1,4 +1,4 @@
TEMPLATE = app
TARGET = qfileopeneventexternal
-QT += core gui widgets
+QT += core gui
SOURCES += qfileopeneventexternal.cpp
diff --git a/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro b/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro
index cf4337b156..9f79fe9ab7 100644
--- a/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro
+++ b/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro
@@ -1,7 +1,7 @@
CONFIG += testcase
TARGET = tst_qkeysequence
-QT += widgets testlib
+QT += testlib
QT += core-private gui-private
SOURCES += tst_qkeysequence.cpp
diff --git a/tests/auto/gui/kernel/qmouseevent/qmouseevent.pro b/tests/auto/gui/kernel/qmouseevent/qmouseevent.pro
index b99c3016b0..5fa886334a 100644
--- a/tests/auto/gui/kernel/qmouseevent/qmouseevent.pro
+++ b/tests/auto/gui/kernel/qmouseevent/qmouseevent.pro
@@ -1,4 +1,4 @@
CONFIG += testcase
TARGET = tst_qmouseevent
-QT += widgets testlib
+QT += testlib
SOURCES += tst_qmouseevent.cpp
diff --git a/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp b/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp
index d8f1f0640e..012502469b 100644
--- a/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp
+++ b/tests/auto/gui/kernel/qmouseevent/tst_qmouseevent.cpp
@@ -41,21 +41,14 @@
#include <QtTest/QtTest>
-#include <qapplication.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qdialog.h>
-
-
#include <qevent.h>
-#include <qwidget.h>
+#include <qwindow.h>
-class MouseEventWidget : public QWidget
+class MouseEventWidget : public QWindow
{
public:
- MouseEventWidget(QWidget *parent = 0) : QWidget(parent)
+ MouseEventWidget(QWindow *parent = 0) : QWindow(parent)
{
- setFocusPolicy(Qt::StrongFocus);
}
bool mousePressEventRecieved;
bool mouseReleaseEventRecieved;
@@ -68,7 +61,7 @@ public:
protected:
void mousePressEvent(QMouseEvent *e)
{
- QWidget::mousePressEvent(e);
+ QWindow::mousePressEvent(e);
mousePressButton = e->button();
mousePressButtons = e->buttons();
mousePressModifiers = e->modifiers();
@@ -77,7 +70,7 @@ protected:
}
void mouseReleaseEvent(QMouseEvent *e)
{
- QWidget::mouseReleaseEvent(e);
+ QWindow::mouseReleaseEvent(e);
mouseReleaseButton = e->button();
mouseReleaseButtons = e->buttons();
mouseReleaseModifiers = e->modifiers();
@@ -179,12 +172,14 @@ void tst_QMouseEvent::checkMousePressEvent()
int modifiers = keyPressed;
QTest::mousePress(testMouseWidget, Qt::MouseButton(buttonPressed), Qt::KeyboardModifiers(keyPressed));
+ qApp->processEvents();
QVERIFY(testMouseWidget->mousePressEventRecieved);
QCOMPARE(testMouseWidget->mousePressButton, button);
QCOMPARE(testMouseWidget->mousePressButtons, buttons);
QCOMPARE(testMouseWidget->mousePressModifiers, modifiers);
QTest::mouseRelease(testMouseWidget, Qt::MouseButton(buttonPressed), Qt::KeyboardModifiers(keyPressed));
+ qApp->processEvents();
}
void tst_QMouseEvent::checkMouseReleaseEvent_data()
@@ -218,6 +213,7 @@ void tst_QMouseEvent::checkMouseReleaseEvent()
int modifiers = keyPressed;
QTest::mouseClick(testMouseWidget, Qt::MouseButton(buttonReleased), Qt::KeyboardModifiers(keyPressed));
+ qApp->processEvents();
QVERIFY(testMouseWidget->mouseReleaseEventRecieved);
QCOMPARE(testMouseWidget->mouseReleaseButton, button);
QCOMPARE(testMouseWidget->mouseReleaseButtons, buttons);
diff --git a/tests/auto/gui/kernel/qpalette/qpalette.pro b/tests/auto/gui/kernel/qpalette/qpalette.pro
index 8975704f0f..9dd3f3e715 100644
--- a/tests/auto/gui/kernel/qpalette/qpalette.pro
+++ b/tests/auto/gui/kernel/qpalette/qpalette.pro
@@ -1,6 +1,6 @@
CONFIG += testcase
TARGET = tst_qpalette
-QT += widgets testlib
+QT += testlib
SOURCES += tst_qpalette.cpp
diff --git a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
index cc46831965..dc393fc2c3 100644
--- a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
+++ b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
@@ -43,7 +43,6 @@
#include <QtTest/QtTest>
#include "qpalette.h"
-#include <qapplication.h>
class tst_QPalette : public QObject
{
diff --git a/tests/auto/gui/painting/painting.pro b/tests/auto/gui/painting/painting.pro
index 62230eeac7..8f018fd921 100644
--- a/tests/auto/gui/painting/painting.pro
+++ b/tests/auto/gui/painting/painting.pro
@@ -7,12 +7,10 @@ SUBDIRS=\
qregion \
qpainter \
qpathclipper \
- qprinterinfo \
qpen \
qpaintengine \
qtransform \
qwmatrix \
- qprinter \
qpolygon \
!contains(QT_CONFIG, private_tests): SUBDIRS -= \
diff --git a/tests/auto/gui/painting/qbrush/qbrush.pro b/tests/auto/gui/painting/qbrush/qbrush.pro
index 2a470c4db1..3ef9b36ef5 100644
--- a/tests/auto/gui/painting/qbrush/qbrush.pro
+++ b/tests/auto/gui/painting/qbrush/qbrush.pro
@@ -1,4 +1,4 @@
CONFIG += testcase
TARGET = tst_qbrush
-QT += widgets testlib
+QT += testlib
SOURCES += tst_qbrush.cpp
diff --git a/tests/auto/gui/painting/qpolygon/qpolygon.pro b/tests/auto/gui/painting/qpolygon/qpolygon.pro
index 869fbd30c5..804fc0dfd2 100644
--- a/tests/auto/gui/painting/qpolygon/qpolygon.pro
+++ b/tests/auto/gui/painting/qpolygon/qpolygon.pro
@@ -1,6 +1,6 @@
CONFIG += testcase
TARGET = tst_qpolygon
-QT += widgets testlib
+QT += testlib
SOURCES += tst_qpolygon.cpp
unix:!mac:LIBS+=-lm
diff --git a/tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp b/tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp
index 5e5f661a09..f9dbbbf219 100644
--- a/tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp
+++ b/tests/auto/gui/painting/qpolygon/tst_qpolygon.cpp
@@ -47,7 +47,6 @@
#include <math.h>
#include <qpainter.h>
-#include <qdialog.h>
class tst_QPolygon : public QObject
{
diff --git a/tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro b/tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro
index 025b3f8a26..3848a287dc 100644
--- a/tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro
+++ b/tests/auto/gui/text/qabstracttextdocumentlayout/qabstracttextdocumentlayout.pro
@@ -4,7 +4,7 @@
CONFIG += testcase
TARGET = tst_qabstracttextdocumentlayout
-QT += widgets testlib
+QT += testlib
SOURCES += tst_qabstracttextdocumentlayout.cpp
diff --git a/tests/auto/gui/text/qstatictext/qstatictext.pro b/tests/auto/gui/text/qstatictext/qstatictext.pro
index a0955af710..67f2e047a4 100644
--- a/tests/auto/gui/text/qstatictext/qstatictext.pro
+++ b/tests/auto/gui/text/qstatictext/qstatictext.pro
@@ -1,6 +1,6 @@
CONFIG += testcase
TARGET = tst_qstatictext
-QT += widgets widgets-private testlib
+QT += testlib
QT += core core-private gui gui-private
SOURCES += tst_qstatictext.cpp
diff --git a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
index 66145f2dcf..fbb9549425 100644
--- a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
+++ b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include <QtTest/QtTest>
-#include <QtWidgets/QApplication>
+#include <QtGui/QGuiApplication>
#include <QtGui/QPainter>
#include <QtGui/QImage>
@@ -48,7 +48,6 @@
#include <qpaintengine.h>
#include <private/qstatictext_p.h>
-#include <private/qapplication_p.h>
// #define DEBUG_SAVE_IMAGE
@@ -296,7 +295,7 @@ void tst_QStaticText::prepareToWrongData()
void tst_QStaticText::setFont()
{
- QFont font = QApplication::font();
+ QFont font = QGuiApplication::font();
font.setBold(true);
font.setPointSize(28);
@@ -618,7 +617,7 @@ void tst_QStaticText::plainTextVsRichText()
void tst_QStaticText::setPenPlainText()
{
- QFont font = QApplication::font();
+ QFont font = QGuiApplication::font();
font.setStyleStrategy(QFont::NoAntialias);
QFontMetricsF fm(font);
@@ -646,7 +645,7 @@ void tst_QStaticText::setPenPlainText()
void tst_QStaticText::setPenRichText()
{
- QFont font = QApplication::font();
+ QFont font = QGuiApplication::font();
font.setStyleStrategy(QFont::NoAntialias);
QFontMetricsF fm(font);
@@ -675,7 +674,7 @@ void tst_QStaticText::setPenRichText()
void tst_QStaticText::richTextOverridesPen()
{
- QFont font = QApplication::font();
+ QFont font = QGuiApplication::font();
font.setStyleStrategy(QFont::NoAntialias);
QFontMetricsF fm(font);
diff --git a/tests/auto/gui/text/qtextblock/qtextblock.pro b/tests/auto/gui/text/qtextblock/qtextblock.pro
index cad009a35a..cf3456bbf6 100644
--- a/tests/auto/gui/text/qtextblock/qtextblock.pro
+++ b/tests/auto/gui/text/qtextblock/qtextblock.pro
@@ -1,7 +1,7 @@
CONFIG += testcase
TARGET = tst_qtextblock
-QT += widgets widgets-private testlib
+QT += testlib
QT += core-private gui-private
SOURCES += tst_qtextblock.cpp
diff --git a/tests/auto/gui/text/qtextpiecetable/qtextpiecetable.pro b/tests/auto/gui/text/qtextpiecetable/qtextpiecetable.pro
index 930d18f5fe..1419e32012 100644
--- a/tests/auto/gui/text/qtextpiecetable/qtextpiecetable.pro
+++ b/tests/auto/gui/text/qtextpiecetable/qtextpiecetable.pro
@@ -1,6 +1,6 @@
CONFIG += testcase
TARGET = tst_qtextpiecetable
-QT += widgets widgets-private testlib
+QT += testlib
QT += core-private gui-private
SOURCES += tst_qtextpiecetable.cpp
HEADERS += ../qtextdocument/common.h
diff --git a/tests/auto/gui/util/qdesktopservices/qdesktopservices.pro b/tests/auto/gui/util/qdesktopservices/qdesktopservices.pro
index 98bc5c3d0d..cf14e6b47a 100644
--- a/tests/auto/gui/util/qdesktopservices/qdesktopservices.pro
+++ b/tests/auto/gui/util/qdesktopservices/qdesktopservices.pro
@@ -1,5 +1,5 @@
CONFIG += testcase
-QT += widgets testlib
+QT += testlib
SOURCES += tst_qdesktopservices.cpp
TARGET = tst_qdesktopservices
diff --git a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
index ad45d00520..0ad37c21e8 100644
--- a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
+++ b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp
@@ -41,7 +41,6 @@
#include <QtTest/QtTest>
-#include <QStandardItemModel>
#include <qdebug.h>
#include <qdesktopservices.h>
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 8685546a5f..438cf866aa 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -2971,9 +2971,6 @@ void tst_QNetworkReply::ioGetFromHttpWithAuthSynchronous()
void tst_QNetworkReply::ioGetFromHttpWithProxyAuth()
{
- qRegisterMetaType<QNetworkProxy>(); // for QSignalSpy
- qRegisterMetaType<QAuthenticator *>();
-
// This test sends three requests
// The first two in parallel
// The third after the first two finished
@@ -3081,9 +3078,6 @@ void tst_QNetworkReply::ioGetFromHttpWithSocksProxy()
// HTTP caching proxies are tested by the above function
// test SOCKSv5 proxies too
- qRegisterMetaType<QNetworkProxy>(); // for QSignalSpy
- qRegisterMetaType<QAuthenticator *>();
-
QFile reference(testDataDir + "/rfc3252.txt");
QVERIFY(reference.open(QIODevice::ReadOnly));
@@ -3141,9 +3135,6 @@ void tst_QNetworkReply::ioGetFromHttpWithSocksProxy()
#ifndef QT_NO_SSL
void tst_QNetworkReply::ioGetFromHttpsWithSslErrors()
{
- qRegisterMetaType<QNetworkReply*>(); // for QSignalSpy
- qRegisterMetaType<QList<QSslError> >();
-
QFile reference(testDataDir + "/rfc3252.txt");
QVERIFY(reference.open(QIODevice::ReadOnly));
@@ -3175,9 +3166,6 @@ void tst_QNetworkReply::ioGetFromHttpsWithIgnoreSslErrors()
// same as above, except that we call ignoreSslErrors and don't connect
// to the sslErrors() signal (which is *still* emitted)
- qRegisterMetaType<QNetworkReply*>(); // for QSignalSpy
- qRegisterMetaType<QList<QSslError> >();
-
QFile reference(testDataDir + "/rfc3252.txt");
QVERIFY(reference.open(QIODevice::ReadOnly));
@@ -3203,9 +3191,6 @@ void tst_QNetworkReply::ioGetFromHttpsWithIgnoreSslErrors()
void tst_QNetworkReply::ioGetFromHttpsWithSslHandshakeError()
{
- qRegisterMetaType<QNetworkReply*>(); // for QSignalSpy
- qRegisterMetaType<QList<QSslError> >();
-
QFile reference(testDataDir + "/rfc3252.txt");
QVERIFY(reference.open(QIODevice::ReadOnly));
@@ -3709,9 +3694,6 @@ void tst_QNetworkReply::ioGetWithManyProxies()
{
// Test proxy factories
- qRegisterMetaType<QNetworkProxy>(); // for QSignalSpy
- qRegisterMetaType<QAuthenticator *>();
-
QFile reference(testDataDir + "/rfc3252.txt");
QVERIFY(reference.open(QIODevice::ReadOnly));
@@ -3874,6 +3856,10 @@ void tst_QNetworkReply::ioPutToFileFromLocalSocket()
QNetworkReplyPtr reply = manager.put(QNetworkRequest(url), passive);
passive->setParent(reply);
+#ifdef Q_OS_WIN
+ if (!data.isEmpty())
+ QEXPECT_FAIL("", "QTBUG-18385", Abort);
+#endif
QVERIFY(waitForFinish(reply) == Success);
QCOMPARE(reply->error(), QNetworkReply::NoError);
@@ -4104,10 +4090,6 @@ void tst_QNetworkReply::ioPostToHttpFromSocket_data()
void tst_QNetworkReply::ioPostToHttpFromSocket()
{
- qRegisterMetaType<QNetworkProxy>(); // for QSignalSpy
- qRegisterMetaType<QAuthenticator *>();
- qRegisterMetaType<QNetworkReply *>();
-
QFETCH(QByteArray, data);
QFETCH(QUrl, url);
QFETCH(QNetworkProxy, proxy);
@@ -4707,7 +4689,6 @@ void tst_QNetworkReply::rateControl()
QNetworkRequest request("debugpipe://localhost:" + QString::number(sender.serverPort()));
QNetworkReplyPtr reply = manager.get(request);
reply->setReadBufferSize(32768);
- qRegisterMetaType<QNetworkReply::NetworkError>("QNetworkReply::NetworkError");
QSignalSpy errorSpy(reply, SIGNAL(error(QNetworkReply::NetworkError)));
RateControlledReader reader(sender, reply, rate, 20);
@@ -5100,7 +5081,6 @@ void tst_QNetworkReply::nestedEventLoops()
// seconds. (see above)
qDebug("Takes 16 seconds to run, please wait");
- qRegisterMetaType<QNetworkReply::NetworkError>();
QUrl url("http://" + QtNetworkSettings::serverName());
QNetworkRequest request(url);
@@ -5321,7 +5301,6 @@ void tst_QNetworkReply::authorizationError()
QCOMPARE(reply->error(), QNetworkReply::NoError);
- qRegisterMetaType<QNetworkReply::NetworkError>("QNetworkReply::NetworkError");
QSignalSpy errorSpy(reply, SIGNAL(error(QNetworkReply::NetworkError)));
QSignalSpy finishedSpy(reply, SIGNAL(finished()));
// now run the request:
@@ -5653,6 +5632,7 @@ void tst_QNetworkReply::getAndThenDeleteObject_data()
void tst_QNetworkReply::getAndThenDeleteObject()
{
+ QSKIP("unstable test - reply may be finished too early");
// yes, this will leak if the testcase fails. I don't care. It must not fail then :P
QNetworkAccessManager *manager = new QNetworkAccessManager();
QNetworkRequest request("http://" + QtNetworkSettings::serverName() + "/qtest/bigfile");
@@ -6050,11 +6030,8 @@ void tst_QNetworkReply::qtbug4121unknownAuthentication()
QNetworkAccessManager manager;
QNetworkReplyPtr reply = manager.get(request);
- qRegisterMetaType<QNetworkReply*>("QNetworkReply*");
- qRegisterMetaType<QAuthenticator*>("QAuthenticator*");
QSignalSpy authSpy(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)));
QSignalSpy finishedSpy(&manager, SIGNAL(finished(QNetworkReply*)));
- qRegisterMetaType<QNetworkReply::NetworkError>("QNetworkReply::NetworkError");
QSignalSpy errorSpy(reply, SIGNAL(error(QNetworkReply::NetworkError)));
connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection);
diff --git a/tests/auto/network/kernel/qnetworkinterface/qnetworkinterface.pro b/tests/auto/network/kernel/qnetworkinterface/qnetworkinterface.pro
index 694dec2ed7..ba401579a6 100644
--- a/tests/auto/network/kernel/qnetworkinterface/qnetworkinterface.pro
+++ b/tests/auto/network/kernel/qnetworkinterface/qnetworkinterface.pro
@@ -3,3 +3,5 @@ TARGET = tst_qnetworkinterface
SOURCES += tst_qnetworkinterface.cpp
QT = core network testlib
+
+win32:CONFIG+=insignificant_test # QTBUG-24451 - localAddress()
diff --git a/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp b/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
index 8a1a391b51..9b7d21eff8 100644
--- a/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
+++ b/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
@@ -81,6 +81,7 @@ public:
private slots:
void systemProxyForQueryCalledFromThread();
+ void systemProxyForQuery_data();
void systemProxyForQuery() const;
#ifndef QT_NO_BEARERMANAGEMENT
void fromConfigurations();
@@ -110,34 +111,88 @@ QString tst_QNetworkProxyFactory::formatProxyName(const QNetworkProxy & proxy) c
return proxyName;
}
+void tst_QNetworkProxyFactory::systemProxyForQuery_data()
+{
+ QTest::addColumn<int>("type");
+ QTest::addColumn<QUrl>("url");
+ QTest::addColumn<QString>("tag");
+ QTest::addColumn<QString>("hostName");
+ QTest::addColumn<int>("port");
+ QTest::addColumn<int>("requiredCapabilities");
+
+ //URLs
+ QTest::newRow("http") << (int)QNetworkProxyQuery::UrlRequest << QUrl("http://qt-project.org") << QString() << QString() << 0 << 0;
+ //windows: "intranet" should be bypassed if "bypass proxy server for local addresses" is ticked
+ QTest::newRow("intranet") << (int)QNetworkProxyQuery::UrlRequest << QUrl("http://qt-test-server") << QString() << QString() << 0 << 0;
+ //windows: "intranet2" should be bypassed if "*.local" is in the exceptions list (advanced settings)
+ QTest::newRow("intranet2") << (int)QNetworkProxyQuery::UrlRequest << QUrl("http://qt-test-server.local") << QString() << QString() << 0 << 0;
+ QTest::newRow("https") << (int)QNetworkProxyQuery::UrlRequest << QUrl("https://qt-project.org") << QString() << QString() << 0 << (int)QNetworkProxy::TunnelingCapability;
+ QTest::newRow("ftp") << (int)QNetworkProxyQuery::UrlRequest << QUrl("ftp://qt-project.org") << QString() << QString() << 0 << 0;
+
+ //TCP
+ QTest::newRow("imap") << (int)QNetworkProxyQuery::TcpSocket << QUrl() << QString() << QString("qt-project.org") << 0 << (int)QNetworkProxy::TunnelingCapability;
+ QTest::newRow("autobind-server") << (int)QNetworkProxyQuery::TcpServer << QUrl() << QString() << QString() << 0 << (int)QNetworkProxy::ListeningCapability;
+ QTest::newRow("web-server") << (int)QNetworkProxyQuery::TcpServer << QUrl() << QString() << QString() << 80 << (int)QNetworkProxy::ListeningCapability;
+
+ //UDP
+ QTest::newRow("udp") << (int)QNetworkProxyQuery::UdpSocket << QUrl() << QString() << QString() << 0 << (int)QNetworkProxy::UdpTunnelingCapability;
+
+ //Protocol tags
+ QTest::newRow("http-tag") << (int)QNetworkProxyQuery::TcpSocket << QUrl() << QString("http") << QString("qt-project.org") << 80 << (int)QNetworkProxy::TunnelingCapability;
+ QTest::newRow("ftp-tag") << (int)QNetworkProxyQuery::TcpSocket << QUrl() << QString("ftp") << QString("qt-project.org") << 21 << (int)QNetworkProxy::TunnelingCapability;
+ QTest::newRow("https-tag") << (int)QNetworkProxyQuery::TcpSocket << QUrl() << QString("https") << QString("qt-project.org") << 443 << (int)QNetworkProxy::TunnelingCapability;
+#ifdef Q_OS_WIN
+ //in Qt 4.8, "socks" would get the socks proxy, but we dont want to enforce that for all platforms
+ QTest::newRow("socks-tag") << (int)QNetworkProxyQuery::TcpSocket << QUrl() << QString("socks") << QString("qt-project.org") << 21 << (int)(QNetworkProxy::TunnelingCapability | QNetworkProxy::ListeningCapability);
+#endif
+ //windows: ssh is not a tag provided by the os, but any tunneling proxy is acceptable
+ QTest::newRow("ssh-tag") << (int)QNetworkProxyQuery::TcpSocket << QUrl() << QString("ssh") << QString("qt-project.org") << 22 << (int)QNetworkProxy::TunnelingCapability;
+
+ //Server protocol tags (ftp/http proxies are no good, we need socks or nothing)
+ QTest::newRow("http-server-tag") << (int)QNetworkProxyQuery::TcpServer << QUrl() << QString("http") << QString() << 80 << (int)QNetworkProxy::ListeningCapability;
+ QTest::newRow("ftp-server-tag") << (int)QNetworkProxyQuery::TcpServer << QUrl() << QString("ftp") << QString() << 21 << (int)QNetworkProxy::ListeningCapability;
+ QTest::newRow("imap-server-tag") << (int)QNetworkProxyQuery::TcpServer << QUrl() << QString("imap") << QString() << 143 << (int)QNetworkProxy::ListeningCapability;
+
+ //UDP protocol tag
+ QTest::newRow("sip-udp-tag") << (int)QNetworkProxyQuery::UdpSocket << QUrl() << QString("sip") << QString("qt-project.org") << 5061 << (int)QNetworkProxy::UdpTunnelingCapability;
+}
+
void tst_QNetworkProxyFactory::systemProxyForQuery() const
{
- QNetworkProxyQuery query(QUrl(QString("http://www.abc.com")), QNetworkProxyQuery::UrlRequest);
- QList<QNetworkProxy> systemProxyList = QNetworkProxyFactory::systemProxyForQuery(query);
- bool pass = true;
- QNetworkProxy proxy;
+ QFETCH(int, type);
+ QFETCH(QUrl, url);
+ QFETCH(QString, tag);
+ QFETCH(QString, hostName);
+ QFETCH(int, port);
+ QFETCH(int, requiredCapabilities);
- QList<QNetworkProxy> nativeProxyList;
- nativeProxyList << QNetworkProxy(QNetworkProxy::HttpProxy, QString("test.proxy.com"), 8080) << QNetworkProxy::NoProxy;
+ QNetworkProxyQuery query;
- foreach (proxy, systemProxyList) {
- if (!nativeProxyList.contains(proxy)) {
- qWarning() << "System proxy not found in native proxy list: " <<
- formatProxyName(proxy);
- pass = false;
- }
+ switch (type) {
+ case QNetworkProxyQuery::UrlRequest:
+ query = QNetworkProxyQuery(url);
+ break;
+ case QNetworkProxyQuery::TcpSocket:
+ case QNetworkProxyQuery::UdpSocket:
+ query = QNetworkProxyQuery(hostName, port, tag, QNetworkProxyQuery::QueryType(type));
+ break;
+ case QNetworkProxyQuery::TcpServer:
+ query = QNetworkProxyQuery(quint16(port), tag);
+ break;
}
- foreach (proxy, nativeProxyList) {
- if (!systemProxyList.contains(proxy)) {
- qWarning() << "Native proxy not found in system proxy list: " <<
- formatProxyName(proxy);
- pass = false;
- }
- }
+ QElapsedTimer sw;
+ sw.start();
+ QList<QNetworkProxy> systemProxyList = QNetworkProxyFactory::systemProxyForQuery(query);
+ qDebug() << sw.elapsed() << "ms";
+ QVERIFY(!systemProxyList.isEmpty());
+
+ // for manual comparison with system
+ qDebug() << systemProxyList;
- if (!pass)
- QFAIL("One or more system proxy lookup failures occurred.");
+ foreach (const QNetworkProxy &proxy, systemProxyList) {
+ QVERIFY((requiredCapabilities == 0) || (proxy.capabilities() & requiredCapabilities));
+ }
}
#ifndef QT_NO_BEARERMANAGEMENT
diff --git a/tests/auto/network/network.pro b/tests/auto/network/network.pro
index 3eafd7df70..2048d14dc8 100644
--- a/tests/auto/network/network.pro
+++ b/tests/auto/network/network.pro
@@ -6,3 +6,7 @@ SUBDIRS=\
ssl \
socket \
+win32 {
+ socket.CONFIG += no_check_target # QTBUG-24451 - all socket tests require waitForX
+ bearer.CONFIG += no_check_target # QTBUG-24503 - these tests fail if machine has a WLAN adaptor
+}
diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
index 5395c7c28b..3c7c3a3da0 100644
--- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
@@ -1475,6 +1475,9 @@ void tst_QTcpSocket::waitForBytesWritten()
//----------------------------------------------------------------------------------
void tst_QTcpSocket::waitForBytesWrittenMinusOne()
{
+#ifdef Q_OS_WIN
+ QSKIP("QTBUG-24451 - indefinite wait may hang");
+#endif
QTcpSocket *socket = newSocket();
socket->connectToHost(QtNetworkSettings::serverName(), 80);
QVERIFY(socket->waitForConnected(10000));
@@ -1500,6 +1503,9 @@ void tst_QTcpSocket::waitForReadyRead()
//----------------------------------------------------------------------------------
void tst_QTcpSocket::waitForReadyReadMinusOne()
{
+#ifdef Q_OS_WIN
+ QSKIP("QTBUG-24451 - indefinite wait may hang");
+#endif
QTcpSocket *socket = newSocket();
socket->connectToHost(QtNetworkSettings::serverName(), 80);
socket->write("GET / HTTP/1.0\r\n\r\n");
@@ -2102,6 +2108,9 @@ void tst_QTcpSocket::abortiveClose_abortSlot()
//----------------------------------------------------------------------------------
void tst_QTcpSocket::localAddressEmptyOnBSD()
{
+#ifdef Q_OS_WIN
+ QSKIP("QTBUG-24451 - indefinite wait may hang");
+#endif
QFETCH_GLOBAL(bool, setProxy);
if (setProxy)
return; //proxy not useful for localhost test case
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index cdb397ccd4..2f9ed0d089 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -1157,6 +1157,9 @@ void tst_QSslSocket::waitForEncrypted()
void tst_QSslSocket::waitForEncryptedMinusOne()
{
+#ifdef Q_OS_WIN
+ QSKIP("QTBUG-24451 - indefinite wait may hang");
+#endif
if (!QSslSocket::supportsSsl())
return;
@@ -1663,6 +1666,9 @@ protected:
void tst_QSslSocket::waitForMinusOne()
{
+#ifdef Q_OS_WIN
+ QSKIP("QTBUG-24451 - indefinite wait may hang");
+#endif
QFETCH_GLOBAL(bool, setProxy);
if (setProxy)
return;
diff --git a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/qsslsocket_onDemandCertificates_member.pro b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/qsslsocket_onDemandCertificates_member.pro
index 33b55b4638..5aeb0e48ac 100644
--- a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/qsslsocket_onDemandCertificates_member.pro
+++ b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_member/qsslsocket_onDemandCertificates_member.pro
@@ -22,3 +22,5 @@ wince* {
}
requires(contains(QT_CONFIG,private_tests))
+
+win32:CONFIG+=insignificant_test # QTBUG-24451 - all
diff --git a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/qsslsocket_onDemandCertificates_static.pro b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/qsslsocket_onDemandCertificates_static.pro
index 8a500a3d99..3955ea106c 100644
--- a/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/qsslsocket_onDemandCertificates_static.pro
+++ b/tests/auto/network/ssl/qsslsocket_onDemandCertificates_static/qsslsocket_onDemandCertificates_static.pro
@@ -22,3 +22,5 @@ wince* {
}
requires(contains(QT_CONFIG,private_tests))
+
+win32:CONFIG+=insignificant_test # QTBUG-24451 - all
diff --git a/tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp b/tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
index a426a90976..14628b2c8b 100644
--- a/tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
+++ b/tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
@@ -94,6 +94,7 @@ void tst_ExceptionSafety_Objects::initTestCase()
// helper structs to create an arbitrary widget
struct AbstractTester
{
+ virtual ~AbstractTester() {}
virtual void operator()(QObject *parent) = 0;
};
Q_DECLARE_METATYPE(AbstractTester *)
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index 4c370bebc7..0edda96f2a 100644
--- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
@@ -403,8 +403,8 @@ void tst_QAccessibility::cleanup()
qWarning("%d accessibility event(s) were not handled in testfunction '%s':", list.count(),
QString(QTest::currentTestFunction()).toAscii().constData());
for (int i = 0; i < list.count(); ++i)
- qWarning(" %d: Object: %p Event: '%s' (%d) Child: %d", i + 1, list.at(i).object,
- eventName(list.at(i).event).toAscii().constData(), list.at(i).event, list.at(i).child);
+ qWarning(" %d: Object: %p Event: '%s' Child: %d", i + 1, list.at(i).object(),
+ eventName(list.at(i).type()).toAscii().constData(), list.at(i).child());
}
QTestAccessibility::clearEvents();
}
@@ -415,20 +415,18 @@ void tst_QAccessibility::eventTest()
button->setObjectName(QString("Olaf"));
button->show();
- QVERIFY_EVENT(button, 0, QAccessible::ObjectShow);
+ QVERIFY_EVENT(QAccessibleEvent(QAccessible::ObjectShow, button, -1));
button->setFocus(Qt::MouseFocusReason);
QTestAccessibility::clearEvents();
QTest::mouseClick(button, Qt::LeftButton, 0);
- QVERIFY_EVENT(button, 0, QAccessible::StateChanged);
- QVERIFY_EVENT(button, 0, QAccessible::StateChanged);
button->setAccessibleName("Olaf the second");
- QVERIFY_EVENT(button, 0, QAccessible::NameChanged);
+ QVERIFY_EVENT(QAccessibleEvent(QAccessible::NameChanged, button));
button->setAccessibleDescription("This is a button labeled Olaf");
- QVERIFY_EVENT(button, 0, QAccessible::DescriptionChanged);
+ QVERIFY_EVENT(QAccessibleEvent(QAccessible::DescriptionChanged, button));
button->hide();
- QVERIFY_EVENT(button, 0, QAccessible::ObjectHide);
+ QVERIFY_EVENT(QAccessibleEvent(QAccessible::ObjectHide, button));
delete button;
}
@@ -732,16 +730,16 @@ void tst_QAccessibility::hideShowTest()
window->show();
QVERIFY(!state(window).invisible);
QVERIFY(!state(child).invisible);
- QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(window, 0, QAccessible::ObjectShow)));
- QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(child, 0, QAccessible::ObjectShow)));
+ QVERIFY(QTestAccessibility::events().contains(QAccessibleEvent(QAccessible::ObjectShow, window)));
+ QVERIFY(QTestAccessibility::events().contains(QAccessibleEvent(QAccessible::ObjectShow, child)));
QTestAccessibility::clearEvents();
// hide() and veryfy that both window and child are invisible and get ObjectHide events.
window->hide();
QVERIFY(state(window).invisible);
QVERIFY(state(child).invisible);
- QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(window, 0, QAccessible::ObjectHide)));
- QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(child, 0, QAccessible::ObjectHide)));
+ QVERIFY(QTestAccessibility::events().contains(QAccessibleEvent(QAccessible::ObjectHide, window)));
+ QVERIFY(QTestAccessibility::events().contains(QAccessibleEvent(QAccessible::ObjectHide, child)));
QTestAccessibility::clearEvents();
delete window;
@@ -822,7 +820,7 @@ void tst_QAccessibility::mainWindowTest()
QLatin1String name = QLatin1String("I am the main window");
mw->setWindowTitle(name);
QTest::qWaitForWindowShown(mw);
- QVERIFY_EVENT(mw, 0, QAccessible::ObjectShow);
+ QVERIFY_EVENT(QAccessibleEvent(QAccessible::ObjectShow, mw));
QAccessibleInterface *interface = QAccessible::queryAccessibleInterface(mw);
QCOMPARE(interface->text(QAccessible::Name), name);
@@ -1052,12 +1050,12 @@ void tst_QAccessibility::scrollBarTest()
scrollBar->resize(200, 50);
scrollBar->show();
QVERIFY(!scrollBarInterface->state().invisible);
- QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(scrollBar, 0, QAccessible::ObjectShow)));
+ QVERIFY(QTestAccessibility::events().contains(QAccessibleEvent(QAccessible::ObjectShow, scrollBar)));
QTestAccessibility::clearEvents();
scrollBar->hide();
QVERIFY(scrollBarInterface->state().invisible);
- QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(scrollBar, 0, QAccessible::ObjectHide)));
+ QVERIFY(QTestAccessibility::events().contains(QAccessibleEvent(QAccessible::ObjectHide, scrollBar)));
QTestAccessibility::clearEvents();
// Test that the left/right subcontrols are set to unavailable when the scrollBar is at the minimum/maximum.
@@ -1498,7 +1496,7 @@ void tst_QAccessibility::spinBoxTest()
QTest::keyPress(spinBox, Qt::Key_Up);
QTest::qWait(200);
EventList events = QTestAccessibility::events();
- QTestAccessibilityEvent expectedEvent(spinBox, 0, (int)QAccessible::ValueChanged);
+ QAccessibleEvent expectedEvent(QAccessible::ValueChanged, spinBox);
QVERIFY(events.contains(expectedEvent));
delete spinBox;
QTestAccessibility::clearEvents();
@@ -1769,7 +1767,7 @@ void tst_QAccessibility::lineEditTest()
le->setFocus(Qt::TabFocusReason);
QTestAccessibility::clearEvents();
le2->setFocus(Qt::TabFocusReason);
- QTRY_VERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(le2, 0, QAccessible::Focus)));
+ QTRY_VERIFY(QTestAccessibility::events().contains(QAccessibleEvent(QAccessible::Focus, le2)));
le->setText(QLatin1String("500"));
le->setValidator(new QIntValidator());
@@ -1789,7 +1787,7 @@ void tst_QAccessibility::lineEditTest()
le3->deselect();
le3->setCursorPosition(3);
QCOMPARE(textIface->cursorPosition(), 3);
- QTRY_VERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(le3, 0, QAccessible::TextCaretMoved)));
+ QTRY_VERIFY(QTestAccessibility::events().contains(QAccessibleEvent(QAccessible::TextCaretMoved, le3)));
QCOMPARE(textIface->selectionCount(), 0);
QTestAccessibility::clearEvents();
@@ -2160,11 +2158,11 @@ void tst_QAccessibility::listTest()
// Check for events
QTest::mouseClick(listView->viewport(), Qt::LeftButton, 0, listView->visualItemRect(listView->item(1)).center());
- QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(listView, 2, QAccessible::Selection)));
- QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(listView, 2, QAccessible::Focus)));
+ QVERIFY(QTestAccessibility::events().contains(QAccessibleEvent(QAccessible::Selection, listView, 2)));
+ QVERIFY(QTestAccessibility::events().contains(QAccessibleEvent(QAccessible::Focus, listView, 2)));
QTest::mouseClick(listView->viewport(), Qt::LeftButton, 0, listView->visualItemRect(listView->item(2)).center());
- QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(listView, 3, QAccessible::Selection)));
- QVERIFY(QTestAccessibility::events().contains(QTestAccessibilityEvent(listView, 3, QAccessible::Focus)));
+ QVERIFY(QTestAccessibility::events().contains(QAccessibleEvent(QAccessible::Selection, listView, 3)));
+ QVERIFY(QTestAccessibility::events().contains(QAccessibleEvent(QAccessible::Focus, listView, 3)));
listView->addItem("Munich");
QCOMPARE(iface->childCount(), 4);
diff --git a/tests/auto/printsupport/kernel/kernel.pro b/tests/auto/printsupport/kernel/kernel.pro
new file mode 100644
index 0000000000..6f5802bf3e
--- /dev/null
+++ b/tests/auto/printsupport/kernel/kernel.pro
@@ -0,0 +1,4 @@
+TEMPLATE=subdirs
+SUBDIRS=\
+ qprinter \
+ qprinterinfo \
diff --git a/tests/auto/gui/painting/qprinter/.gitignore b/tests/auto/printsupport/kernel/qprinter/.gitignore
index 85de0e9675..85de0e9675 100644
--- a/tests/auto/gui/painting/qprinter/.gitignore
+++ b/tests/auto/printsupport/kernel/qprinter/.gitignore
diff --git a/tests/auto/gui/painting/qprinter/qprinter.pro b/tests/auto/printsupport/kernel/qprinter/qprinter.pro
index 7543e91f8c..7543e91f8c 100644
--- a/tests/auto/gui/painting/qprinter/qprinter.pro
+++ b/tests/auto/printsupport/kernel/qprinter/qprinter.pro
diff --git a/tests/auto/gui/painting/qprinter/tst_qprinter.cpp b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp
index 3460ad702b..3460ad702b 100644
--- a/tests/auto/gui/painting/qprinter/tst_qprinter.cpp
+++ b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp
diff --git a/tests/auto/gui/painting/qprinterinfo/.gitignore b/tests/auto/printsupport/kernel/qprinterinfo/.gitignore
index fcef7c1997..fcef7c1997 100644
--- a/tests/auto/gui/painting/qprinterinfo/.gitignore
+++ b/tests/auto/printsupport/kernel/qprinterinfo/.gitignore
diff --git a/tests/auto/gui/painting/qprinterinfo/qprinterinfo.pro b/tests/auto/printsupport/kernel/qprinterinfo/qprinterinfo.pro
index 88cb07f338..88cb07f338 100644
--- a/tests/auto/gui/painting/qprinterinfo/qprinterinfo.pro
+++ b/tests/auto/printsupport/kernel/qprinterinfo/qprinterinfo.pro
diff --git a/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp b/tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp
index 2323dc8df3..2323dc8df3 100644
--- a/tests/auto/gui/painting/qprinterinfo/tst_qprinterinfo.cpp
+++ b/tests/auto/printsupport/kernel/qprinterinfo/tst_qprinterinfo.cpp
diff --git a/tests/auto/printsupport/printsupport.pro b/tests/auto/printsupport/printsupport.pro
new file mode 100644
index 0000000000..69ba296738
--- /dev/null
+++ b/tests/auto/printsupport/printsupport.pro
@@ -0,0 +1,3 @@
+TEMPLATE=subdirs
+SUBDIRS=\
+ kernel \
diff --git a/tests/auto/sql/kernel/qsql/qsql.pro b/tests/auto/sql/kernel/qsql/qsql.pro
index ac21bb392c..df6e553d8a 100644
--- a/tests/auto/sql/kernel/qsql/qsql.pro
+++ b/tests/auto/sql/kernel/qsql/qsql.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
TARGET = tst_qsql
SOURCES += tst_qsql.cpp
-QT += sql sql-private gui widgets testlib
+QT += sql sql-private gui testlib
wince*: {
DEPLOYMENT_PLUGIN += qsqlite
diff --git a/tests/auto/sql/kernel/qsql/tst_qsql.cpp b/tests/auto/sql/kernel/qsql/tst_qsql.cpp
index b02093adae..2656f4802f 100644
--- a/tests/auto/sql/kernel/qsql/tst_qsql.cpp
+++ b/tests/auto/sql/kernel/qsql/tst_qsql.cpp
@@ -152,7 +152,7 @@ void tst_QSql::basicDriverTest()
}
// make sure that the static stuff will be deleted
-// when using multiple QApplication objects
+// when using multiple QGuiApplication objects
void tst_QSql::open()
{
int i;
@@ -160,7 +160,7 @@ void tst_QSql::open()
const char *argv[] = {"test"};
int count = -1;
for ( i = 0; i < 10; ++i ) {
- QApplication app(argc, const_cast<char **>(argv), false);
+ QGuiApplication app(argc, const_cast<char **>(argv), false);
tst_Databases dbs;
dbs.open();
diff --git a/tests/auto/testlib/selftests/expected_cmptest.lightxml b/tests/auto/testlib/selftests/expected_cmptest.lightxml
index d1cccd4bd2..83b2e6e137 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.lightxml
+++ b/tests/auto/testlib/selftests/expected_cmptest.lightxml
@@ -15,7 +15,7 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214">
<DataTag><![CDATA[int, string]]></DataTag>
<Description><![CDATA[Compared values are not the same
- Actual (actual): QVariant(int,123)
+ Actual (actual): QVariant(int,123)
Expected (expected): QVariant(QString,hi)]]></Description>
</Incident>
<Incident type="pass" file="" line="0">
@@ -24,19 +24,19 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214">
<DataTag><![CDATA[null hash, invalid]]></DataTag>
<Description><![CDATA[Compared values are not the same
- Actual (actual): QVariant(QVariantHash)
+ Actual (actual): QVariant(QVariantHash)
Expected (expected): QVariant()]]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214">
<DataTag><![CDATA[string, null user type]]></DataTag>
<Description><![CDATA[Compared values are not the same
- Actual (actual): QVariant(QString,A simple string)
+ Actual (actual): QVariant(QString,A simple string)
Expected (expected): QVariant(PhonyClass)]]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214">
<DataTag><![CDATA[both non-null user type]]></DataTag>
<Description><![CDATA[Compared values are not the same
- Actual (actual): QVariant(PhonyClass,<value not representable as string>)
+ Actual (actual): QVariant(PhonyClass,<value not representable as string>)
Expected (expected): QVariant(PhonyClass,<value not representable as string>)]]></Description>
</Incident>
</TestFunction>
@@ -50,31 +50,31 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308">
<DataTag><![CDATA[last item different]]></DataTag>
<Description><![CDATA[Compared QStringLists differ at index 2.
- Actual (opA) : 'string3'
- Expected (opB) : 'DIFFERS']]></Description>
+ Actual (opA): 'string3'
+ Expected (opB): 'DIFFERS']]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308">
<DataTag><![CDATA[second-last item different]]></DataTag>
<Description><![CDATA[Compared QStringLists differ at index 2.
- Actual (opA) : 'string3'
- Expected (opB) : 'DIFFERS']]></Description>
+ Actual (opA): 'string3'
+ Expected (opB): 'DIFFERS']]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308">
<DataTag><![CDATA[prefix]]></DataTag>
<Description><![CDATA[Compared QStringLists have different sizes.
- Actual (opA) size : '2'
+ Actual (opA) size: '2'
Expected (opB) size: '1']]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308">
<DataTag><![CDATA[short list second]]></DataTag>
<Description><![CDATA[Compared QStringLists have different sizes.
- Actual (opA) size : '12'
+ Actual (opA) size: '12'
Expected (opB) size: '1']]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308">
<DataTag><![CDATA[short list first]]></DataTag>
<Description><![CDATA[Compared QStringLists have different sizes.
- Actual (opA) size : '1'
+ Actual (opA) size: '1'
Expected (opB) size: '12']]></Description>
</Incident>
</TestFunction>
@@ -85,13 +85,13 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333">
<DataTag><![CDATA[one null]]></DataTag>
<Description><![CDATA[Compared QPixmaps differ.
- Actual (opA).isNull() : 1
+ Actual (opA).isNull(): 1
Expected (opB).isNull(): 0]]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333">
<DataTag><![CDATA[other null]]></DataTag>
<Description><![CDATA[Compared QPixmaps differ.
- Actual (opA).isNull() : 0
+ Actual (opA).isNull(): 0
Expected (opB).isNull(): 1]]></Description>
</Incident>
<Incident type="pass" file="" line="0">
@@ -100,7 +100,7 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333">
<DataTag><![CDATA[different size]]></DataTag>
<Description><![CDATA[Compared QPixmaps differ in size.
- Actual (opA) : 11x20
+ Actual (opA): 11x20
Expected (opB): 20x20]]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333">
@@ -115,13 +115,13 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360">
<DataTag><![CDATA[one null]]></DataTag>
<Description><![CDATA[Compared QImages differ.
- Actual (opA).isNull() : 1
+ Actual (opA).isNull(): 1
Expected (opB).isNull(): 0]]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360">
<DataTag><![CDATA[other null]]></DataTag>
<Description><![CDATA[Compared QImages differ.
- Actual (opA).isNull() : 0
+ Actual (opA).isNull(): 0
Expected (opB).isNull(): 1]]></Description>
</Incident>
<Incident type="pass" file="" line="0">
@@ -130,13 +130,13 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360">
<DataTag><![CDATA[different size]]></DataTag>
<Description><![CDATA[Compared QImages differ in size.
- Actual (opA) : 11x20
+ Actual (opA): 11x20
Expected (opB): 20x20]]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360">
<DataTag><![CDATA[different format]]></DataTag>
<Description><![CDATA[Compared QImages differ in format.
- Actual (opA) : 6
+ Actual (opA): 6
Expected (opB): 3]]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360">
diff --git a/tests/auto/testlib/selftests/expected_cmptest.txt b/tests/auto/testlib/selftests/expected_cmptest.txt
index fce635ae5a..de666ed8b1 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.txt
+++ b/tests/auto/testlib/selftests/expected_cmptest.txt
@@ -4,76 +4,76 @@ PASS : tst_Cmptest::initTestCase()
PASS : tst_Cmptest::compare_boolfuncs()
PASS : tst_Cmptest::compare_pointerfuncs()
FAIL! : tst_Cmptest::compare_tostring(int, string) Compared values are not the same
- Actual (actual): QVariant(int,123)
+ Actual (actual): QVariant(int,123)
Expected (expected): QVariant(QString,hi)
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(214)]
PASS : tst_Cmptest::compare_tostring(both invalid)
FAIL! : tst_Cmptest::compare_tostring(null hash, invalid) Compared values are not the same
- Actual (actual): QVariant(QVariantHash)
+ Actual (actual): QVariant(QVariantHash)
Expected (expected): QVariant()
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(214)]
FAIL! : tst_Cmptest::compare_tostring(string, null user type) Compared values are not the same
- Actual (actual): QVariant(QString,A simple string)
+ Actual (actual): QVariant(QString,A simple string)
Expected (expected): QVariant(PhonyClass)
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(214)]
FAIL! : tst_Cmptest::compare_tostring(both non-null user type) Compared values are not the same
- Actual (actual): QVariant(PhonyClass,<value not representable as string>)
+ Actual (actual): QVariant(PhonyClass,<value not representable as string>)
Expected (expected): QVariant(PhonyClass,<value not representable as string>)
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(214)]
PASS : tst_Cmptest::compareQStringLists(empty lists)
PASS : tst_Cmptest::compareQStringLists(equal lists)
FAIL! : tst_Cmptest::compareQStringLists(last item different) Compared QStringLists differ at index 2.
- Actual (opA) : 'string3'
- Expected (opB) : 'DIFFERS'
+ Actual (opA): 'string3'
+ Expected (opB): 'DIFFERS'
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)]
FAIL! : tst_Cmptest::compareQStringLists(second-last item different) Compared QStringLists differ at index 2.
- Actual (opA) : 'string3'
- Expected (opB) : 'DIFFERS'
+ Actual (opA): 'string3'
+ Expected (opB): 'DIFFERS'
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)]
FAIL! : tst_Cmptest::compareQStringLists(prefix) Compared QStringLists have different sizes.
- Actual (opA) size : '2'
+ Actual (opA) size: '2'
Expected (opB) size: '1'
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)]
FAIL! : tst_Cmptest::compareQStringLists(short list second) Compared QStringLists have different sizes.
- Actual (opA) size : '12'
+ Actual (opA) size: '12'
Expected (opB) size: '1'
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)]
FAIL! : tst_Cmptest::compareQStringLists(short list first) Compared QStringLists have different sizes.
- Actual (opA) size : '1'
+ Actual (opA) size: '1'
Expected (opB) size: '12'
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(308)]
PASS : tst_Cmptest::compareQPixmaps(both null)
FAIL! : tst_Cmptest::compareQPixmaps(one null) Compared QPixmaps differ.
- Actual (opA).isNull() : 1
+ Actual (opA).isNull(): 1
Expected (opB).isNull(): 0
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(333)]
FAIL! : tst_Cmptest::compareQPixmaps(other null) Compared QPixmaps differ.
- Actual (opA).isNull() : 0
+ Actual (opA).isNull(): 0
Expected (opB).isNull(): 1
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(333)]
PASS : tst_Cmptest::compareQPixmaps(equal)
FAIL! : tst_Cmptest::compareQPixmaps(different size) Compared QPixmaps differ in size.
- Actual (opA) : 11x20
+ Actual (opA): 11x20
Expected (opB): 20x20
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(333)]
FAIL! : tst_Cmptest::compareQPixmaps(different pixels) Compared values are not the same
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(333)]
PASS : tst_Cmptest::compareQImages(both null)
FAIL! : tst_Cmptest::compareQImages(one null) Compared QImages differ.
- Actual (opA).isNull() : 1
+ Actual (opA).isNull(): 1
Expected (opB).isNull(): 0
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)]
FAIL! : tst_Cmptest::compareQImages(other null) Compared QImages differ.
- Actual (opA).isNull() : 0
+ Actual (opA).isNull(): 0
Expected (opB).isNull(): 1
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)]
PASS : tst_Cmptest::compareQImages(equal)
FAIL! : tst_Cmptest::compareQImages(different size) Compared QImages differ in size.
- Actual (opA) : 11x20
+ Actual (opA): 11x20
Expected (opB): 20x20
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)]
FAIL! : tst_Cmptest::compareQImages(different format) Compared QImages differ in format.
- Actual (opA) : 6
+ Actual (opA): 6
Expected (opB): 3
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp(360)]
FAIL! : tst_Cmptest::compareQImages(different pixels) Compared values are not the same
diff --git a/tests/auto/testlib/selftests/expected_cmptest.xml b/tests/auto/testlib/selftests/expected_cmptest.xml
index 90bb313518..339ef01e2d 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.xml
+++ b/tests/auto/testlib/selftests/expected_cmptest.xml
@@ -17,7 +17,7 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214">
<DataTag><![CDATA[int, string]]></DataTag>
<Description><![CDATA[Compared values are not the same
- Actual (actual): QVariant(int,123)
+ Actual (actual): QVariant(int,123)
Expected (expected): QVariant(QString,hi)]]></Description>
</Incident>
<Incident type="pass" file="" line="0">
@@ -26,19 +26,19 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214">
<DataTag><![CDATA[null hash, invalid]]></DataTag>
<Description><![CDATA[Compared values are not the same
- Actual (actual): QVariant(QVariantHash)
+ Actual (actual): QVariant(QVariantHash)
Expected (expected): QVariant()]]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214">
<DataTag><![CDATA[string, null user type]]></DataTag>
<Description><![CDATA[Compared values are not the same
- Actual (actual): QVariant(QString,A simple string)
+ Actual (actual): QVariant(QString,A simple string)
Expected (expected): QVariant(PhonyClass)]]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="214">
<DataTag><![CDATA[both non-null user type]]></DataTag>
<Description><![CDATA[Compared values are not the same
- Actual (actual): QVariant(PhonyClass,<value not representable as string>)
+ Actual (actual): QVariant(PhonyClass,<value not representable as string>)
Expected (expected): QVariant(PhonyClass,<value not representable as string>)]]></Description>
</Incident>
</TestFunction>
@@ -52,31 +52,31 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308">
<DataTag><![CDATA[last item different]]></DataTag>
<Description><![CDATA[Compared QStringLists differ at index 2.
- Actual (opA) : 'string3'
- Expected (opB) : 'DIFFERS']]></Description>
+ Actual (opA): 'string3'
+ Expected (opB): 'DIFFERS']]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308">
<DataTag><![CDATA[second-last item different]]></DataTag>
<Description><![CDATA[Compared QStringLists differ at index 2.
- Actual (opA) : 'string3'
- Expected (opB) : 'DIFFERS']]></Description>
+ Actual (opA): 'string3'
+ Expected (opB): 'DIFFERS']]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308">
<DataTag><![CDATA[prefix]]></DataTag>
<Description><![CDATA[Compared QStringLists have different sizes.
- Actual (opA) size : '2'
+ Actual (opA) size: '2'
Expected (opB) size: '1']]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308">
<DataTag><![CDATA[short list second]]></DataTag>
<Description><![CDATA[Compared QStringLists have different sizes.
- Actual (opA) size : '12'
+ Actual (opA) size: '12'
Expected (opB) size: '1']]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="308">
<DataTag><![CDATA[short list first]]></DataTag>
<Description><![CDATA[Compared QStringLists have different sizes.
- Actual (opA) size : '1'
+ Actual (opA) size: '1'
Expected (opB) size: '12']]></Description>
</Incident>
</TestFunction>
@@ -87,13 +87,13 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333">
<DataTag><![CDATA[one null]]></DataTag>
<Description><![CDATA[Compared QPixmaps differ.
- Actual (opA).isNull() : 1
+ Actual (opA).isNull(): 1
Expected (opB).isNull(): 0]]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333">
<DataTag><![CDATA[other null]]></DataTag>
<Description><![CDATA[Compared QPixmaps differ.
- Actual (opA).isNull() : 0
+ Actual (opA).isNull(): 0
Expected (opB).isNull(): 1]]></Description>
</Incident>
<Incident type="pass" file="" line="0">
@@ -102,7 +102,7 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333">
<DataTag><![CDATA[different size]]></DataTag>
<Description><![CDATA[Compared QPixmaps differ in size.
- Actual (opA) : 11x20
+ Actual (opA): 11x20
Expected (opB): 20x20]]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="333">
@@ -117,13 +117,13 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360">
<DataTag><![CDATA[one null]]></DataTag>
<Description><![CDATA[Compared QImages differ.
- Actual (opA).isNull() : 1
+ Actual (opA).isNull(): 1
Expected (opB).isNull(): 0]]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360">
<DataTag><![CDATA[other null]]></DataTag>
<Description><![CDATA[Compared QImages differ.
- Actual (opA).isNull() : 0
+ Actual (opA).isNull(): 0
Expected (opB).isNull(): 1]]></Description>
</Incident>
<Incident type="pass" file="" line="0">
@@ -132,13 +132,13 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360">
<DataTag><![CDATA[different size]]></DataTag>
<Description><![CDATA[Compared QImages differ in size.
- Actual (opA) : 11x20
+ Actual (opA): 11x20
Expected (opB): 20x20]]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360">
<DataTag><![CDATA[different format]]></DataTag>
<Description><![CDATA[Compared QImages differ in format.
- Actual (opA) : 6
+ Actual (opA): 6
Expected (opB): 3]]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/cmptest/tst_cmptest.cpp" line="360">
diff --git a/tests/auto/testlib/selftests/expected_cmptest.xunitxml b/tests/auto/testlib/selftests/expected_cmptest.xunitxml
index 00f5f7f480..33e78a5290 100644
--- a/tests/auto/testlib/selftests/expected_cmptest.xunitxml
+++ b/tests/auto/testlib/selftests/expected_cmptest.xunitxml
@@ -9,59 +9,59 @@
<testcase result="pass" name="compare_pointerfuncs"/>
<testcase result="fail" name="compare_tostring">
<failure tag="int, string" message="Compared values are not the same
- Actual (actual): QVariant(int,123)
+ Actual (actual): QVariant(int,123)
Expected (expected): QVariant(QString,hi)" result="fail"/>
<failure tag="null hash, invalid" message="Compared values are not the same
- Actual (actual): QVariant(QVariantHash)
+ Actual (actual): QVariant(QVariantHash)
Expected (expected): QVariant()" result="fail"/>
<failure tag="string, null user type" message="Compared values are not the same
- Actual (actual): QVariant(QString,A simple string)
+ Actual (actual): QVariant(QString,A simple string)
Expected (expected): QVariant(PhonyClass)" result="fail"/>
<failure tag="both non&#x002D;null user type" message="Compared values are not the same
- Actual (actual): QVariant(PhonyClass,&lt;value not representable as string&gt;)
+ Actual (actual): QVariant(PhonyClass,&lt;value not representable as string&gt;)
Expected (expected): QVariant(PhonyClass,&lt;value not representable as string&gt;)" result="fail"/>
</testcase>
<testcase result="fail" name="compareQStringLists">
<failure tag="last item different" message="Compared QStringLists differ at index 2.
- Actual (opA) : &apos;string3&apos;
- Expected (opB) : &apos;DIFFERS&apos;" result="fail"/>
+ Actual (opA): &apos;string3&apos;
+ Expected (opB): &apos;DIFFERS&apos;" result="fail"/>
<failure tag="second&#x002D;last item different" message="Compared QStringLists differ at index 2.
- Actual (opA) : &apos;string3&apos;
- Expected (opB) : &apos;DIFFERS&apos;" result="fail"/>
+ Actual (opA): &apos;string3&apos;
+ Expected (opB): &apos;DIFFERS&apos;" result="fail"/>
<failure tag="prefix" message="Compared QStringLists have different sizes.
- Actual (opA) size : &apos;2&apos;
+ Actual (opA) size: &apos;2&apos;
Expected (opB) size: &apos;1&apos;" result="fail"/>
<failure tag="short list second" message="Compared QStringLists have different sizes.
- Actual (opA) size : &apos;12&apos;
+ Actual (opA) size: &apos;12&apos;
Expected (opB) size: &apos;1&apos;" result="fail"/>
<failure tag="short list first" message="Compared QStringLists have different sizes.
- Actual (opA) size : &apos;1&apos;
+ Actual (opA) size: &apos;1&apos;
Expected (opB) size: &apos;12&apos;" result="fail"/>
</testcase>
<testcase result="fail" name="compareQPixmaps">
<failure tag="one null" message="Compared QPixmaps differ.
- Actual (opA).isNull() : 1
+ Actual (opA).isNull(): 1
Expected (opB).isNull(): 0" result="fail"/>
<failure tag="other null" message="Compared QPixmaps differ.
- Actual (opA).isNull() : 0
+ Actual (opA).isNull(): 0
Expected (opB).isNull(): 1" result="fail"/>
<failure tag="different size" message="Compared QPixmaps differ in size.
- Actual (opA) : 11x20
+ Actual (opA): 11x20
Expected (opB): 20x20" result="fail"/>
<failure tag="different pixels" message="Compared values are not the same" result="fail"/>
</testcase>
<testcase result="fail" name="compareQImages">
<failure tag="one null" message="Compared QImages differ.
- Actual (opA).isNull() : 1
+ Actual (opA).isNull(): 1
Expected (opB).isNull(): 0" result="fail"/>
<failure tag="other null" message="Compared QImages differ.
- Actual (opA).isNull() : 0
+ Actual (opA).isNull(): 0
Expected (opB).isNull(): 1" result="fail"/>
<failure tag="different size" message="Compared QImages differ in size.
- Actual (opA) : 11x20
+ Actual (opA): 11x20
Expected (opB): 20x20" result="fail"/>
<failure tag="different format" message="Compared QImages differ in format.
- Actual (opA) : 6
+ Actual (opA): 6
Expected (opB): 3" result="fail"/>
<failure tag="different pixels" message="Compared values are not the same" result="fail"/>
</testcase>
diff --git a/tests/auto/testlib/selftests/expected_datetime.lightxml b/tests/auto/testlib/selftests/expected_datetime.lightxml
index 17fd48a196..39af3a2fcf 100644
--- a/tests/auto/testlib/selftests/expected_datetime.lightxml
+++ b/tests/auto/testlib/selftests/expected_datetime.lightxml
@@ -8,7 +8,7 @@
<TestFunction name="dateTime">
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp" line="66">
<Description><![CDATA[Compared values are not the same
- Actual (local): 2000/05/03 04:03:04.000[local time]
+ Actual (local): 2000/05/03 04:03:04.000[local time]
Expected (utc): 2000/05/03 04:03:04.000[UTC]]]></Description>
</Incident>
</TestFunction>
@@ -19,13 +19,13 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp" line="74">
<DataTag><![CDATA[empty rhs]]></DataTag>
<Description><![CDATA[Compared values are not the same
- Actual (operandA): http://example.com
+ Actual (operandA): http://example.com
Expected (operandB): ]]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp" line="74">
<DataTag><![CDATA[empty lhs]]></DataTag>
<Description><![CDATA[Compared values are not the same
- Actual (operandA):
+ Actual (operandA):
Expected (operandB): http://example.com]]></Description>
</Incident>
<Incident type="pass" file="" line="0">
diff --git a/tests/auto/testlib/selftests/expected_datetime.txt b/tests/auto/testlib/selftests/expected_datetime.txt
index 239886ca8e..6bd4103284 100644
--- a/tests/auto/testlib/selftests/expected_datetime.txt
+++ b/tests/auto/testlib/selftests/expected_datetime.txt
@@ -2,16 +2,16 @@
Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@
PASS : tst_DateTime::initTestCase()
FAIL! : tst_DateTime::dateTime() Compared values are not the same
- Actual (local): 2000/05/03 04:03:04.000[local time]
+ Actual (local): 2000/05/03 04:03:04.000[local time]
Expected (utc): 2000/05/03 04:03:04.000[UTC]
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp(33)]
PASS : tst_DateTime::qurl(empty urls)
FAIL! : tst_DateTime::qurl(empty rhs) Compared values are not the same
- Actual (operandA): http://example.com
+ Actual (operandA): http://example.com
Expected (operandB):
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp(41)]
FAIL! : tst_DateTime::qurl(empty lhs) Compared values are not the same
- Actual (operandA):
+ Actual (operandA):
Expected (operandB): http://example.com
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp(41)]
PASS : tst_DateTime::qurl(same urls)
diff --git a/tests/auto/testlib/selftests/expected_datetime.xml b/tests/auto/testlib/selftests/expected_datetime.xml
index 747ff13730..a3b7bbdee0 100644
--- a/tests/auto/testlib/selftests/expected_datetime.xml
+++ b/tests/auto/testlib/selftests/expected_datetime.xml
@@ -10,7 +10,7 @@
<TestFunction name="dateTime">
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp" line="66">
<Description><![CDATA[Compared values are not the same
- Actual (local): 2000/05/03 04:03:04.000[local time]
+ Actual (local): 2000/05/03 04:03:04.000[local time]
Expected (utc): 2000/05/03 04:03:04.000[UTC]]]></Description>
</Incident>
</TestFunction>
@@ -21,13 +21,13 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp" line="74">
<DataTag><![CDATA[empty rhs]]></DataTag>
<Description><![CDATA[Compared values are not the same
- Actual (operandA): http://example.com
+ Actual (operandA): http://example.com
Expected (operandB): ]]></Description>
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/datetime/tst_datetime.cpp" line="74">
<DataTag><![CDATA[empty lhs]]></DataTag>
<Description><![CDATA[Compared values are not the same
- Actual (operandA):
+ Actual (operandA):
Expected (operandB): http://example.com]]></Description>
</Incident>
<Incident type="pass" file="" line="0">
diff --git a/tests/auto/testlib/selftests/expected_datetime.xunitxml b/tests/auto/testlib/selftests/expected_datetime.xunitxml
index f25e20674b..b6bb600251 100644
--- a/tests/auto/testlib/selftests/expected_datetime.xunitxml
+++ b/tests/auto/testlib/selftests/expected_datetime.xunitxml
@@ -7,15 +7,15 @@
<testcase result="pass" name="initTestCase"/>
<testcase result="fail" name="dateTime">
<failure message="Compared values are not the same
- Actual (local): 2000/05/03 04:03:04.000[local time]
+ Actual (local): 2000/05/03 04:03:04.000[local time]
Expected (utc): 2000/05/03 04:03:04.000[UTC]" result="fail"/>
</testcase>
<testcase result="fail" name="qurl">
<failure tag="empty rhs" message="Compared values are not the same
- Actual (operandA): http://example.com
+ Actual (operandA): http://example.com
Expected (operandB): " result="fail"/>
<failure tag="empty lhs" message="Compared values are not the same
- Actual (operandA):
+ Actual (operandA):
Expected (operandB): http://example.com" result="fail"/>
</testcase>
<testcase result="pass" name="cleanupTestCase"/>
diff --git a/tests/auto/testlib/selftests/expected_expectfail.lightxml b/tests/auto/testlib/selftests/expected_expectfail.lightxml
index 34f4f1e70b..55bd9578a8 100644
--- a/tests/auto/testlib/selftests/expected_expectfail.lightxml
+++ b/tests/auto/testlib/selftests/expected_expectfail.lightxml
@@ -132,7 +132,7 @@
<TestFunction name="xpassDataDrivenWithQCompare">
<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="271">
<DataTag><![CDATA[XPass]]></DataTag>
- <Description><![CDATA[COMPARE()]]></Description>
+ <Description><![CDATA[QCOMPARE(1, 1) returned TRUE unexpectedly.]]></Description>
</Incident>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[Pass]]></DataTag>
diff --git a/tests/auto/testlib/selftests/expected_expectfail.txt b/tests/auto/testlib/selftests/expected_expectfail.txt
index bd4e2172d6..6028b5ddfe 100644
--- a/tests/auto/testlib/selftests/expected_expectfail.txt
+++ b/tests/auto/testlib/selftests/expected_expectfail.txt
@@ -47,7 +47,7 @@ XPASS : tst_ExpectFail::xpass() 'true' returned TRUE unexpectedly. ()
XPASS : tst_ExpectFail::xpassDataDrivenWithQVerify(XPass) 'true' returned TRUE unexpectedly. ()
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(250)]
PASS : tst_ExpectFail::xpassDataDrivenWithQVerify(Pass)
-XPASS : tst_ExpectFail::xpassDataDrivenWithQCompare(XPass) COMPARE()
+XPASS : tst_ExpectFail::xpassDataDrivenWithQCompare(XPass) QCOMPARE(1, 1) returned TRUE unexpectedly.
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(271)]
PASS : tst_ExpectFail::xpassDataDrivenWithQCompare(Pass)
PASS : tst_ExpectFail::cleanupTestCase()
diff --git a/tests/auto/testlib/selftests/expected_expectfail.xml b/tests/auto/testlib/selftests/expected_expectfail.xml
index ff870a6a68..e3200b00d6 100644
--- a/tests/auto/testlib/selftests/expected_expectfail.xml
+++ b/tests/auto/testlib/selftests/expected_expectfail.xml
@@ -134,7 +134,7 @@
<TestFunction name="xpassDataDrivenWithQCompare">
<Incident type="xpass" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp" line="271">
<DataTag><![CDATA[XPass]]></DataTag>
- <Description><![CDATA[COMPARE()]]></Description>
+ <Description><![CDATA[QCOMPARE(1, 1) returned TRUE unexpectedly.]]></Description>
</Incident>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[Pass]]></DataTag>
diff --git a/tests/auto/testlib/selftests/expected_expectfail.xunitxml b/tests/auto/testlib/selftests/expected_expectfail.xunitxml
index 6040af41ff..45c260c77f 100644
--- a/tests/auto/testlib/selftests/expected_expectfail.xunitxml
+++ b/tests/auto/testlib/selftests/expected_expectfail.xunitxml
@@ -45,7 +45,7 @@
<failure tag="XPass" message="&apos;true&apos; returned TRUE unexpectedly. ()" result="xpass"/>
</testcase>
<testcase result="xpass" name="xpassDataDrivenWithQCompare">
- <failure tag="XPass" message="COMPARE()" result="xpass"/>
+ <failure tag="XPass" message="QCOMPARE(1, 1) returned TRUE unexpectedly." result="xpass"/>
</testcase>
<testcase result="pass" name="cleanupTestCase"/>
<system-err>
diff --git a/tests/auto/testlib/selftests/expected_float.txt b/tests/auto/testlib/selftests/expected_float.txt
index 6ebbeffde5..6a7804adc0 100644
--- a/tests/auto/testlib/selftests/expected_float.txt
+++ b/tests/auto/testlib/selftests/expected_float.txt
@@ -3,28 +3,28 @@ Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE
PASS : tst_float::initTestCase()
PASS : tst_float::floatComparisons(should SUCCEED 1)
FAIL! : tst_float::floatComparisons(should FAIL 1) Compared floats are not the same (fuzzy compare)
- Actual (operandLeft): 1
+ Actual (operandLeft): 1
Expected (operandRight): 3
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(61)]
FAIL! : tst_float::floatComparisons(should FAIL 2) Compared floats are not the same (fuzzy compare)
- Actual (operandLeft): 1e-07
+ Actual (operandLeft): 1e-07
Expected (operandRight): 3e-07
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(61)]
FAIL! : tst_float::floatComparisons(should FAIL 3) Compared floats are not the same (fuzzy compare)
- Actual (operandLeft): 99998
+ Actual (operandLeft): 99998
Expected (operandRight): 99999
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(61)]
PASS : tst_float::floatComparisons(should SUCCEED 2)
FAIL! : tst_float::compareFloatTests(1e0) Compared floats are not the same (fuzzy compare)
- Actual (t1): 1
+ Actual (t1): 1
Expected (t3): 3
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(104)]
FAIL! : tst_float::compareFloatTests(1e-7) Compared floats are not the same (fuzzy compare)
- Actual (t1): 1e-07
+ Actual (t1): 1e-07
Expected (t3): 3e-07
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(104)]
FAIL! : tst_float::compareFloatTests(1e+7) Compared floats are not the same (fuzzy compare)
- Actual (t1): 1e+07
+ Actual (t1): 1e+07
Expected (t3): 3e+07
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/float/tst_float.cpp(104)]
PASS : tst_float::cleanupTestCase()
diff --git a/tests/auto/testlib/selftests/expected_strcmp.lightxml b/tests/auto/testlib/selftests/expected_strcmp.lightxml
index 3e71add066..d5135fd7df 100644
--- a/tests/auto/testlib/selftests/expected_strcmp.lightxml
+++ b/tests/auto/testlib/selftests/expected_strcmp.lightxml
@@ -20,35 +20,35 @@
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="109">
<Description><![CDATA[Compared values are not the same
- Actual (a): 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 ...
+ Actual (a): 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 ...
Expected (b): 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 ...]]></Description>
</Incident>
</TestFunction>
<TestFunction name="failByteArray">
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="115">
<Description><![CDATA[Compared values are not the same
- Actual (QByteArray("abc")): 61 62 63
+ Actual (QByteArray("abc")): 61 62 63
Expected (QByteArray("cba")): 63 62 61]]></Description>
</Incident>
</TestFunction>
<TestFunction name="failByteArrayNull">
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="121">
<Description><![CDATA[Compared values are not the same
- Actual (QByteArray("foo")): 66 6F 6F
+ Actual (QByteArray("foo")): 66 6F 6F
Expected (QByteArray()): ]]></Description>
</Incident>
</TestFunction>
<TestFunction name="failByteArrayEmpty">
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="126">
<Description><![CDATA[Compared values are not the same
- Actual (QByteArray("")):
+ Actual (QByteArray("")):
Expected (QByteArray("foo")): 66 6F 6F]]></Description>
</Incident>
</TestFunction>
<TestFunction name="failByteArraySingleChars">
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="133">
<Description><![CDATA[Compared values are not the same
- Actual (QByteArray("6")): 36
+ Actual (QByteArray("6")): 36
Expected (QByteArray("7")): 37]]></Description>
</Incident>
</TestFunction>
diff --git a/tests/auto/testlib/selftests/expected_strcmp.txt b/tests/auto/testlib/selftests/expected_strcmp.txt
index a9e51dae5c..804d6b9265 100644
--- a/tests/auto/testlib/selftests/expected_strcmp.txt
+++ b/tests/auto/testlib/selftests/expected_strcmp.txt
@@ -9,23 +9,23 @@ XFAIL : tst_StrCmp::compareByteArray() Next test should fail
XFAIL : tst_StrCmp::compareByteArray() Next test should fail
Loc: [./tst_strcmp.cpp(69)]
FAIL! : tst_StrCmp::compareByteArray() Compared values are not the same
- Actual (a): 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 ...
+ Actual (a): 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 ...
Expected (b): 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 ...
Loc: [./tst_strcmp.cpp(76)]
FAIL! : tst_StrCmp::failByteArray() Compared values are not the same
- Actual (QByteArray("abc")): 61 62 63
+ Actual (QByteArray("abc")): 61 62 63
Expected (QByteArray("cba")): 63 62 61
Loc: [./tst_strcmp.cpp(82)]
FAIL! : tst_StrCmp::failByteArrayNull() Compared values are not the same
- Actual (QByteArray("foo")): 66 6F 6F
+ Actual (QByteArray("foo")): 66 6F 6F
Expected (QByteArray()):
Loc: [./tst_strcmp.cpp(88)]
FAIL! : tst_StrCmp::failByteArrayEmpty() Compared values are not the same
- Actual (QByteArray("")):
+ Actual (QByteArray("")):
Expected (QByteArray("foo")): 66 6F 6F
Loc: [./tst_strcmp.cpp(93)]
FAIL! : tst_StrCmp::failByteArraySingleChars() Compared values are not the same
- Actual (QByteArray("6")): 36
+ Actual (QByteArray("6")): 36
Expected (QByteArray("7")): 37
Loc: [./tst_strcmp.cpp(100)]
PASS : tst_StrCmp::cleanupTestCase()
diff --git a/tests/auto/testlib/selftests/expected_strcmp.xml b/tests/auto/testlib/selftests/expected_strcmp.xml
index 280eec3c9a..c35509ad7f 100644
--- a/tests/auto/testlib/selftests/expected_strcmp.xml
+++ b/tests/auto/testlib/selftests/expected_strcmp.xml
@@ -22,35 +22,35 @@
</Incident>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="109">
<Description><![CDATA[Compared values are not the same
- Actual (a): 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 ...
+ Actual (a): 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 ...
Expected (b): 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 ...]]></Description>
</Incident>
</TestFunction>
<TestFunction name="failByteArray">
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="115">
<Description><![CDATA[Compared values are not the same
- Actual (QByteArray("abc")): 61 62 63
+ Actual (QByteArray("abc")): 61 62 63
Expected (QByteArray("cba")): 63 62 61]]></Description>
</Incident>
</TestFunction>
<TestFunction name="failByteArrayNull">
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="121">
<Description><![CDATA[Compared values are not the same
- Actual (QByteArray("foo")): 66 6F 6F
+ Actual (QByteArray("foo")): 66 6F 6F
Expected (QByteArray()): ]]></Description>
</Incident>
</TestFunction>
<TestFunction name="failByteArrayEmpty">
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="126">
<Description><![CDATA[Compared values are not the same
- Actual (QByteArray("")):
+ Actual (QByteArray("")):
Expected (QByteArray("foo")): 66 6F 6F]]></Description>
</Incident>
</TestFunction>
<TestFunction name="failByteArraySingleChars">
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/strcmp/tst_strcmp.cpp" line="133">
<Description><![CDATA[Compared values are not the same
- Actual (QByteArray("6")): 36
+ Actual (QByteArray("6")): 36
Expected (QByteArray("7")): 37]]></Description>
</Incident>
</TestFunction>
diff --git a/tests/auto/testlib/selftests/expected_strcmp.xunitxml b/tests/auto/testlib/selftests/expected_strcmp.xunitxml
index c2b694b8bb..a900e2f17a 100644
--- a/tests/auto/testlib/selftests/expected_strcmp.xunitxml
+++ b/tests/auto/testlib/selftests/expected_strcmp.xunitxml
@@ -11,27 +11,27 @@
<!-- message="Next test should fail" type="info" -->
<!-- message="Next test should fail" type="info" -->
<failure message="Compared values are not the same
- Actual (a): 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 ...
+ Actual (a): 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 ...
Expected (b): 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 ..." result="fail"/>
</testcase>
<testcase result="fail" name="failByteArray">
<failure message="Compared values are not the same
- Actual (QByteArray(&quot;abc&quot;)): 61 62 63
+ Actual (QByteArray(&quot;abc&quot;)): 61 62 63
Expected (QByteArray(&quot;cba&quot;)): 63 62 61" result="fail"/>
</testcase>
<testcase result="fail" name="failByteArrayNull">
<failure message="Compared values are not the same
- Actual (QByteArray(&quot;foo&quot;)): 66 6F 6F
+ Actual (QByteArray(&quot;foo&quot;)): 66 6F 6F
Expected (QByteArray()): " result="fail"/>
</testcase>
<testcase result="fail" name="failByteArrayEmpty">
<failure message="Compared values are not the same
- Actual (QByteArray(&quot;&quot;)):
+ Actual (QByteArray(&quot;&quot;)):
Expected (QByteArray(&quot;foo&quot;)): 66 6F 6F" result="fail"/>
</testcase>
<testcase result="fail" name="failByteArraySingleChars">
<failure message="Compared values are not the same
- Actual (QByteArray(&quot;6&quot;)): 36
+ Actual (QByteArray(&quot;6&quot;)): 36
Expected (QByteArray(&quot;7&quot;)): 37" result="fail"/>
</testcase>
<testcase result="pass" name="cleanupTestCase"/>
diff --git a/tests/auto/testlib/selftests/expected_subtest.lightxml b/tests/auto/testlib/selftests/expected_subtest.lightxml
index e7d8d53efc..b156dc3991 100644
--- a/tests/auto/testlib/selftests/expected_subtest.lightxml
+++ b/tests/auto/testlib/selftests/expected_subtest.lightxml
@@ -122,7 +122,7 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp" line="154">
<DataTag><![CDATA[data1]]></DataTag>
<Description><![CDATA[Compared values are not the same
- Actual (str): hello1
+ Actual (str): hello1
Expected (QString("hello0")): hello0]]></Description>
</Incident>
<Message type="qdebug" file="" line="0">
@@ -140,7 +140,7 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp" line="154">
<DataTag><![CDATA[data2]]></DataTag>
<Description><![CDATA[Compared values are not the same
- Actual (str): hello2
+ Actual (str): hello2
Expected (QString("hello0")): hello0]]></Description>
</Incident>
<Message type="qdebug" file="" line="0">
diff --git a/tests/auto/testlib/selftests/expected_subtest.txt b/tests/auto/testlib/selftests/expected_subtest.txt
index 7b29bfc8c3..940eb167fa 100644
--- a/tests/auto/testlib/selftests/expected_subtest.txt
+++ b/tests/auto/testlib/selftests/expected_subtest.txt
@@ -33,14 +33,14 @@ PASS : tst_Subtest::test3(data0)
QDEBUG : tst_Subtest::test3(data1) init test3 data1
QDEBUG : tst_Subtest::test3(data1) test2 test3 data1
FAIL! : tst_Subtest::test3(data1) Compared values are not the same
- Actual (str): hello1
+ Actual (str): hello1
Expected (QString("hello0")): hello0
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp(154)]
QDEBUG : tst_Subtest::test3(data1) cleanup test3 data1
QDEBUG : tst_Subtest::test3(data2) init test3 data2
QDEBUG : tst_Subtest::test3(data2) test2 test3 data2
FAIL! : tst_Subtest::test3(data2) Compared values are not the same
- Actual (str): hello2
+ Actual (str): hello2
Expected (QString("hello0")): hello0
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp(154)]
QDEBUG : tst_Subtest::test3(data2) cleanup test3 data2
diff --git a/tests/auto/testlib/selftests/expected_subtest.xml b/tests/auto/testlib/selftests/expected_subtest.xml
index 8a3846599c..89dd7e3006 100644
--- a/tests/auto/testlib/selftests/expected_subtest.xml
+++ b/tests/auto/testlib/selftests/expected_subtest.xml
@@ -124,7 +124,7 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp" line="154">
<DataTag><![CDATA[data1]]></DataTag>
<Description><![CDATA[Compared values are not the same
- Actual (str): hello1
+ Actual (str): hello1
Expected (QString("hello0")): hello0]]></Description>
</Incident>
<Message type="qdebug" file="" line="0">
@@ -142,7 +142,7 @@
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/subtest/tst_subtest.cpp" line="154">
<DataTag><![CDATA[data2]]></DataTag>
<Description><![CDATA[Compared values are not the same
- Actual (str): hello2
+ Actual (str): hello2
Expected (QString("hello0")): hello0]]></Description>
</Incident>
<Message type="qdebug" file="" line="0">
diff --git a/tests/auto/testlib/selftests/expected_subtest.xunitxml b/tests/auto/testlib/selftests/expected_subtest.xunitxml
index c228dc8f54..6097000e7f 100644
--- a/tests/auto/testlib/selftests/expected_subtest.xunitxml
+++ b/tests/auto/testlib/selftests/expected_subtest.xunitxml
@@ -38,13 +38,13 @@
<!-- tag="data1" message="init test3 data1 " type="qdebug" -->
<!-- tag="data1" message="test2 test3 data1 " type="qdebug" -->
<failure tag="data1" message="Compared values are not the same
- Actual (str): hello1
+ Actual (str): hello1
Expected (QString(&quot;hello0&quot;)): hello0" result="fail"/>
<!-- tag="data1" message="cleanup test3 data1 " type="qdebug" -->
<!-- tag="data2" message="init test3 data2 " type="qdebug" -->
<!-- tag="data2" message="test2 test3 data2 " type="qdebug" -->
<failure tag="data2" message="Compared values are not the same
- Actual (str): hello2
+ Actual (str): hello2
Expected (QString(&quot;hello0&quot;)): hello0" result="fail"/>
<!-- tag="data2" message="cleanup test3 data2 " type="qdebug" -->
</testcase>
diff --git a/tests/auto/testlib/selftests/expected_verbose2.lightxml b/tests/auto/testlib/selftests/expected_verbose2.lightxml
index 1310f2bb09..2937adbe01 100644
--- a/tests/auto/testlib/selftests/expected_verbose2.lightxml
+++ b/tests/auto/testlib/selftests/expected_verbose2.lightxml
@@ -12,7 +12,7 @@
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112">
<DataTag><![CDATA[row 1]]></DataTag>
- <Description><![CDATA[COMPARE()]]></Description>
+ <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[row 1]]></DataTag>
@@ -23,7 +23,7 @@
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112">
<DataTag><![CDATA[row 2]]></DataTag>
- <Description><![CDATA[COMPARE()]]></Description>
+ <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[row 2]]></DataTag>
@@ -36,7 +36,7 @@
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112">
<DataTag><![CDATA[row 1]]></DataTag>
- <Description><![CDATA[COMPARE()]]></Description>
+ <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[row 1]]></DataTag>
@@ -53,7 +53,7 @@
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112">
<DataTag><![CDATA[row 1]]></DataTag>
- <Description><![CDATA[COMPARE()]]></Description>
+ <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[row 1]]></DataTag>
@@ -78,7 +78,7 @@
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112">
<DataTag><![CDATA[row 2]]></DataTag>
- <Description><![CDATA[COMPARE()]]></Description>
+ <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[row 2]]></DataTag>
@@ -123,7 +123,7 @@
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112">
<DataTag><![CDATA[row 2]]></DataTag>
- <Description><![CDATA[COMPARE()]]></Description>
+ <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[row 2]]></DataTag>
diff --git a/tests/auto/testlib/selftests/expected_verbose2.txt b/tests/auto/testlib/selftests/expected_verbose2.txt
index 9012a7c569..34957f4ae7 100644
--- a/tests/auto/testlib/selftests/expected_verbose2.txt
+++ b/tests/auto/testlib/selftests/expected_verbose2.txt
@@ -5,18 +5,18 @@ PASS : tst_Counting::initTestCase()
INFO : tst_Counting::testPassPass() entering
INFO : tst_Counting::testPassPass(row 1) QVERIFY(true)
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(111)]
-INFO : tst_Counting::testPassPass(row 1) COMPARE()
+INFO : tst_Counting::testPassPass(row 1) QCOMPARE(2 + 1, 3)
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(112)]
PASS : tst_Counting::testPassPass(row 1)
INFO : tst_Counting::testPassPass(row 2) QVERIFY(true)
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(111)]
-INFO : tst_Counting::testPassPass(row 2) COMPARE()
+INFO : tst_Counting::testPassPass(row 2) QCOMPARE(2 + 1, 3)
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(112)]
PASS : tst_Counting::testPassPass(row 2)
INFO : tst_Counting::testPassSkip() entering
INFO : tst_Counting::testPassSkip(row 1) QVERIFY(true)
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(111)]
-INFO : tst_Counting::testPassSkip(row 1) COMPARE()
+INFO : tst_Counting::testPassSkip(row 1) QCOMPARE(2 + 1, 3)
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(112)]
PASS : tst_Counting::testPassSkip(row 1)
SKIP : tst_Counting::testPassSkip(row 2) Skipping
@@ -24,7 +24,7 @@ SKIP : tst_Counting::testPassSkip(row 2) Skipping
INFO : tst_Counting::testPassFail() entering
INFO : tst_Counting::testPassFail(row 1) QVERIFY(true)
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(111)]
-INFO : tst_Counting::testPassFail(row 1) COMPARE()
+INFO : tst_Counting::testPassFail(row 1) QCOMPARE(2 + 1, 3)
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(112)]
PASS : tst_Counting::testPassFail(row 1)
INFO : tst_Counting::testPassFail(row 2) QVERIFY(false)
@@ -36,7 +36,7 @@ SKIP : tst_Counting::testSkipPass(row 1) Skipping
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(118)]
INFO : tst_Counting::testSkipPass(row 2) QVERIFY(true)
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(111)]
-INFO : tst_Counting::testSkipPass(row 2) COMPARE()
+INFO : tst_Counting::testSkipPass(row 2) QCOMPARE(2 + 1, 3)
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(112)]
PASS : tst_Counting::testSkipPass(row 2)
INFO : tst_Counting::testSkipSkip() entering
@@ -58,7 +58,7 @@ FAIL! : tst_Counting::testFailPass(row 1) 'false' returned FALSE. ()
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(115)]
INFO : tst_Counting::testFailPass(row 2) QVERIFY(true)
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(111)]
-INFO : tst_Counting::testFailPass(row 2) COMPARE()
+INFO : tst_Counting::testFailPass(row 2) QCOMPARE(2 + 1, 3)
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp(112)]
PASS : tst_Counting::testFailPass(row 2)
INFO : tst_Counting::testFailSkip() entering
diff --git a/tests/auto/testlib/selftests/expected_verbose2.xml b/tests/auto/testlib/selftests/expected_verbose2.xml
index 693ef2b187..d181c6d215 100644
--- a/tests/auto/testlib/selftests/expected_verbose2.xml
+++ b/tests/auto/testlib/selftests/expected_verbose2.xml
@@ -14,7 +14,7 @@
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112">
<DataTag><![CDATA[row 1]]></DataTag>
- <Description><![CDATA[COMPARE()]]></Description>
+ <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[row 1]]></DataTag>
@@ -25,7 +25,7 @@
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112">
<DataTag><![CDATA[row 2]]></DataTag>
- <Description><![CDATA[COMPARE()]]></Description>
+ <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[row 2]]></DataTag>
@@ -38,7 +38,7 @@
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112">
<DataTag><![CDATA[row 1]]></DataTag>
- <Description><![CDATA[COMPARE()]]></Description>
+ <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[row 1]]></DataTag>
@@ -55,7 +55,7 @@
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112">
<DataTag><![CDATA[row 1]]></DataTag>
- <Description><![CDATA[COMPARE()]]></Description>
+ <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[row 1]]></DataTag>
@@ -80,7 +80,7 @@
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112">
<DataTag><![CDATA[row 2]]></DataTag>
- <Description><![CDATA[COMPARE()]]></Description>
+ <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[row 2]]></DataTag>
@@ -125,7 +125,7 @@
</Message>
<Message type="info" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/counting/tst_counting.cpp" line="112">
<DataTag><![CDATA[row 2]]></DataTag>
- <Description><![CDATA[COMPARE()]]></Description>
+ <Description><![CDATA[QCOMPARE(2 + 1, 3)]]></Description>
</Message>
<Incident type="pass" file="" line="0">
<DataTag><![CDATA[row 2]]></DataTag>
diff --git a/tests/auto/testlib/selftests/expected_verbose2.xunitxml b/tests/auto/testlib/selftests/expected_verbose2.xunitxml
index 8b9ed5257d..a774cb9d9f 100644
--- a/tests/auto/testlib/selftests/expected_verbose2.xunitxml
+++ b/tests/auto/testlib/selftests/expected_verbose2.xunitxml
@@ -7,25 +7,25 @@
<testcase result="pass" name="initTestCase"/>
<testcase result="pass" name="testPassPass">
<!-- tag="row 1" message="QVERIFY(true)" type="info" -->
- <!-- tag="row 1" message="COMPARE()" type="info" -->
+ <!-- tag="row 1" message="QCOMPARE(2 + 1, 3)" type="info" -->
<!-- tag="row 2" message="QVERIFY(true)" type="info" -->
- <!-- tag="row 2" message="COMPARE()" type="info" -->
+ <!-- tag="row 2" message="QCOMPARE(2 + 1, 3)" type="info" -->
</testcase>
<testcase result="pass" name="testPassSkip">
<!-- tag="row 1" message="QVERIFY(true)" type="info" -->
- <!-- tag="row 1" message="COMPARE()" type="info" -->
+ <!-- tag="row 1" message="QCOMPARE(2 + 1, 3)" type="info" -->
<!-- tag="row 2" message="Skipping" type="skip" -->
</testcase>
<testcase result="fail" name="testPassFail">
<!-- tag="row 1" message="QVERIFY(true)" type="info" -->
- <!-- tag="row 1" message="COMPARE()" type="info" -->
+ <!-- tag="row 1" message="QCOMPARE(2 + 1, 3)" type="info" -->
<!-- tag="row 2" message="QVERIFY(false)" type="info" -->
<failure tag="row 2" message="&apos;false&apos; returned FALSE. ()" result="fail"/>
</testcase>
<testcase result="pass" name="testSkipPass">
<!-- tag="row 1" message="Skipping" type="skip" -->
<!-- tag="row 2" message="QVERIFY(true)" type="info" -->
- <!-- tag="row 2" message="COMPARE()" type="info" -->
+ <!-- tag="row 2" message="QCOMPARE(2 + 1, 3)" type="info" -->
</testcase>
<testcase name="testSkipSkip">
<!-- tag="row 1" message="Skipping" type="skip" -->
@@ -40,7 +40,7 @@
<!-- tag="row 1" message="QVERIFY(false)" type="info" -->
<failure tag="row 1" message="&apos;false&apos; returned FALSE. ()" result="fail"/>
<!-- tag="row 2" message="QVERIFY(true)" type="info" -->
- <!-- tag="row 2" message="COMPARE()" type="info" -->
+ <!-- tag="row 2" message="QCOMPARE(2 + 1, 3)" type="info" -->
</testcase>
<testcase result="fail" name="testFailSkip">
<!-- tag="row 1" message="QVERIFY(false)" type="info" -->
@@ -70,25 +70,25 @@
<testcase result="pass" name="cleanupTestCase"/>
<system-err>
<![CDATA[QVERIFY(true)]]>
-<![CDATA[COMPARE()]]>
+<![CDATA[QCOMPARE(2 + 1, 3)]]>
<![CDATA[QVERIFY(true)]]>
-<![CDATA[COMPARE()]]>
+<![CDATA[QCOMPARE(2 + 1, 3)]]>
<![CDATA[QVERIFY(true)]]>
-<![CDATA[COMPARE()]]>
+<![CDATA[QCOMPARE(2 + 1, 3)]]>
<![CDATA[Skipping]]>
<![CDATA[QVERIFY(true)]]>
-<![CDATA[COMPARE()]]>
+<![CDATA[QCOMPARE(2 + 1, 3)]]>
<![CDATA[QVERIFY(false)]]>
<![CDATA[Skipping]]>
<![CDATA[QVERIFY(true)]]>
-<![CDATA[COMPARE()]]>
+<![CDATA[QCOMPARE(2 + 1, 3)]]>
<![CDATA[Skipping]]>
<![CDATA[Skipping]]>
<![CDATA[Skipping]]>
<![CDATA[QVERIFY(false)]]>
<![CDATA[QVERIFY(false)]]>
<![CDATA[QVERIFY(true)]]>
-<![CDATA[COMPARE()]]>
+<![CDATA[QCOMPARE(2 + 1, 3)]]>
<![CDATA[QVERIFY(false)]]>
<![CDATA[Skipping]]>
<![CDATA[QVERIFY(false)]]>
diff --git a/tests/auto/testlib/selftests/expected_xunit.lightxml b/tests/auto/testlib/selftests/expected_xunit.lightxml
index 71a57373d6..0615f6fd61 100644
--- a/tests/auto/testlib/selftests/expected_xunit.lightxml
+++ b/tests/auto/testlib/selftests/expected_xunit.lightxml
@@ -17,7 +17,7 @@
</Message>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp" line="74">
<Description><![CDATA[Compared values are not the same
- Actual (2): 2
+ Actual (2): 2
Expected (3): 3]]></Description>
</Incident>
</TestFunction>
diff --git a/tests/auto/testlib/selftests/expected_xunit.txt b/tests/auto/testlib/selftests/expected_xunit.txt
index 51c8f89599..88e2949580 100644
--- a/tests/auto/testlib/selftests/expected_xunit.txt
+++ b/tests/auto/testlib/selftests/expected_xunit.txt
@@ -6,7 +6,7 @@ WARNING: tst_Xunit::testFunc1() just a QWARN() !
PASS : tst_Xunit::testFunc1()
QDEBUG : tst_Xunit::testFunc2() a qDebug() call with comment-ending stuff -->
FAIL! : tst_Xunit::testFunc2() Compared values are not the same
- Actual (2): 2
+ Actual (2): 2
Expected (3): 3
Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp(74)]
SKIP : tst_Xunit::testFunc3() skipping this function!
diff --git a/tests/auto/testlib/selftests/expected_xunit.xml b/tests/auto/testlib/selftests/expected_xunit.xml
index a1e6b20963..bfd1e9f8fa 100644
--- a/tests/auto/testlib/selftests/expected_xunit.xml
+++ b/tests/auto/testlib/selftests/expected_xunit.xml
@@ -19,7 +19,7 @@
</Message>
<Incident type="fail" file="/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp" line="74">
<Description><![CDATA[Compared values are not the same
- Actual (2): 2
+ Actual (2): 2
Expected (3): 3]]></Description>
</Incident>
</TestFunction>
diff --git a/tests/auto/testlib/selftests/expected_xunit.xunitxml b/tests/auto/testlib/selftests/expected_xunit.xunitxml
index e7403443ea..7d133da7a5 100644
--- a/tests/auto/testlib/selftests/expected_xunit.xunitxml
+++ b/tests/auto/testlib/selftests/expected_xunit.xunitxml
@@ -11,7 +11,7 @@
<testcase result="fail" name="testFunc2">
<!-- message="a qDebug() call with comment&#x002D;ending stuff &#x002D;&#x002D;&gt;" type="qdebug" -->
<failure message="Compared values are not the same
- Actual (2): 2
+ Actual (2): 2
Expected (3): 3" result="fail"/>
</testcase>
<testcase name="testFunc3">
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index 5d216992d7..97458abfbf 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -104,7 +104,7 @@ inline bool qCompare
}
if (qAbs(qreal(r1.total) - qreal(r2.total)) <= qreal(r1.total)*variance) {
- return compare_helper(true, "COMPARE()", file, line);
+ return compare_helper(true, 0, 0, 0, actual, expected, file, line);
}
// Whoops, didn't match. Compare the whole string for the most useful failure message.
@@ -571,12 +571,13 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
// the actual output.
if (exp.count() == 0) {
QList<QList<QByteArray> > expArr;
+ QList<QByteArray> tmp;
int i = 1;
do {
- exp = expectedResult(subdir + QString("_%1").arg(i++), logger);
- if (exp.count())
- expArr += exp;
- } while (exp.count());
+ tmp = expectedResult(subdir + QString("_%1").arg(i++), logger);
+ if (tmp.count())
+ expArr += tmp;
+ } while (tmp.count());
for (int j = 0; j < expArr.count(); ++j) {
if (res.count() == expArr.at(j).count()) {
@@ -584,12 +585,24 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
break;
}
}
+
+ if (expArr.count()) {
+ QVERIFY2(exp.count(),
+ qPrintable(QString::fromLatin1("None of the expected output files for "
+ "%1 format has matching line count.")
+ .arg(loggers.at(n))));
+ }
} else {
QVERIFY2(res.count() == exp.count(),
qPrintable(QString::fromLatin1("Mismatch in line count: %1 != %2 (%3).")
.arg(res.count()).arg(exp.count()).arg(loggers.at(n))));
}
+ // By this point, we should have loaded a non-empty expected data file.
+ QVERIFY2(exp.count(),
+ qPrintable(QString::fromLatin1("Expected test data for %1 format is empty or not found.")
+ .arg(loggers.at(n))));
+
// For xml output formats, verify that the log is valid XML.
if (logFormat(logger) == "xunitxml" || logFormat(logger) == "xml" || logFormat(logger) == "lightxml") {
QByteArray xml(actualOutputs[n]);
diff --git a/tests/auto/tools/qmake/testdata/one_space/one_space.pro b/tests/auto/tools/qmake/testdata/one_space/one_space.pro
index 247bd27096..c5ffa40742 100644
--- a/tests/auto/tools/qmake/testdata/one_space/one_space.pro
+++ b/tests/auto/tools/qmake/testdata/one_space/one_space.pro
@@ -3,8 +3,3 @@ CONFIG += qt warn_on
SOURCES = main.cpp
TARGET = "one space"
DESTDIR = ./
-
-infile($(QTDIR)/.qmake.cache, CONFIG, debug):CONFIG += debug
-infile($(QTDIR)/.qmake.cache, CONFIG, release):CONFIG += release
-
-
diff --git a/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro b/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro
index a8c4ad613d..94af3cd3ba 100644
--- a/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro
+++ b/tests/auto/tools/qmake/testdata/simple_app/simple_app.pro
@@ -6,8 +6,3 @@ SOURCES = test_file.cpp \
RESOURCES = test.qrc
TARGET = simple_app
DESTDIR = ./
-
-infile($(QTDIR)/.qmake.cache, CONFIG, debug):CONFIG += debug
-infile($(QTDIR)/.qmake.cache, CONFIG, release):CONFIG += release
-
-
diff --git a/tests/auto/tools/qmake/testdata/simple_dll/simple_dll.pro b/tests/auto/tools/qmake/testdata/simple_dll/simple_dll.pro
index 9af38ecce6..09c18d1631 100644
--- a/tests/auto/tools/qmake/testdata/simple_dll/simple_dll.pro
+++ b/tests/auto/tools/qmake/testdata/simple_dll/simple_dll.pro
@@ -12,8 +12,3 @@ MOC_DIR = tmp
OBJECTS_DIR = tmp
TARGET = simple_dll
DESTDIR = ./
-
-infile($(QTDIR)/.qmake.cache, CONFIG, debug):CONFIG += debug
-infile($(QTDIR)/.qmake.cache, CONFIG, release):CONFIG += release
-
-
diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_app/simple_app.pro b/tests/auto/tools/qmake/testdata/subdirs/simple_app/simple_app.pro
index f496d5bb8e..4191f142d8 100644
--- a/tests/auto/tools/qmake/testdata/subdirs/simple_app/simple_app.pro
+++ b/tests/auto/tools/qmake/testdata/subdirs/simple_app/simple_app.pro
@@ -5,8 +5,3 @@ SOURCES = test_file.cpp \
main.cpp
TARGET = simple_app
DESTDIR = ./
-
-infile($(QTDIR)/.qmake.cache, CONFIG, debug):CONFIG += debug
-infile($(QTDIR)/.qmake.cache, CONFIG, release):CONFIG += release
-
-
diff --git a/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple_dll.pro b/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple_dll.pro
index a54a07a0e7..09c18d1631 100644
--- a/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple_dll.pro
+++ b/tests/auto/tools/qmake/testdata/subdirs/simple_dll/simple_dll.pro
@@ -1,4 +1,3 @@
-include($(QTDIR)/.qmake.cache)
TEMPLATE = lib
CONFIG += qt warn_on dll
@@ -13,8 +12,3 @@ MOC_DIR = tmp
OBJECTS_DIR = tmp
TARGET = simple_dll
DESTDIR = ./
-
-infile($(QTDIR)/.qmake.cache, CONFIG, debug):CONFIG += debug
-infile($(QTDIR)/.qmake.cache, CONFIG, release):CONFIG += release
-
-
diff --git a/tests/auto/tools/rcc/.gitignore b/tests/auto/tools/rcc/.gitignore
index 1da39dbd88..6d81961fdb 100644
--- a/tests/auto/tools/rcc/.gitignore
+++ b/tests/auto/tools/rcc/.gitignore
@@ -1 +1,2 @@
tst_rcc
+data/binary/*.rcc
diff --git a/tests/auto/tools/rcc/data/binary/aliasdir/aliasdir.txt b/tests/auto/tools/rcc/data/binary/aliasdir/aliasdir.txt
new file mode 100644
index 0000000000..dcf7937f0a
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/aliasdir/aliasdir.txt
@@ -0,0 +1 @@
+"This is a korean text file"
diff --git a/tests/auto/tools/rcc/data/binary/aliasdir/compressme.txt b/tests/auto/tools/rcc/data/binary/aliasdir/compressme.txt
new file mode 100644
index 0000000000..bd596cdacd
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/aliasdir/compressme.txt
@@ -0,0 +1,322 @@
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
diff --git a/tests/auto/tools/rcc/data/binary/aliases.expected b/tests/auto/tools/rcc/data/binary/aliases.expected
new file mode 100644
index 0000000000..693b633717
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/aliases.expected
@@ -0,0 +1,4 @@
+currentdir.txt currentdir.txt
+alias.txt currentdir2.txt
+otheralias.txt blahblah.txt
+alias3 ../parentdir.txt
diff --git a/tests/auto/tools/rcc/data/binary/aliases.qrc b/tests/auto/tools/rcc/data/binary/aliases.qrc
new file mode 100644
index 0000000000..ac049c3e65
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/aliases.qrc
@@ -0,0 +1,10 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>currentdir.txt</file>
+ <file alias="alias.txt">currentdir2.txt</file>
+ <file alias="otheralias.txt">blahblah.txt</file>
+ </qresource>
+ <qresource>
+ <file alias="alias3">../parentdir.txt</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/tools/rcc/data/binary/allfeatures.de.expected b/tests/auto/tools/rcc/data/binary/allfeatures.de.expected
new file mode 100644
index 0000000000..fa918d0039
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/allfeatures.de.expected
@@ -0,0 +1,13 @@
+/test/abc/123/+++/currentdir.txt currentdir.txt
+/test/abc/123/+++/currentdir2.txt ./currentdir2.txt
+/test/abc/123/+++/parentdir.txt ../parentdir.txt
+/test/abc/123/+++/subdir/subdir.txt subdir/subdir.txt
+/search_file.txt search_file.txt
+/searchpath1/search_file.txt searchpath1/search_file.txt
+/searchpath2/search_file.txt searchpath2/search_file.txt
+test/testdir.txt test/testdir.txt
+otherdir/otherdir.txt otherdir/otherdir.txt
+aliasdir/aliasdir.txt test/german.txt
+test/test/test1.txt test/test/test1.txt
+test/test/test2.txt test/test/test2.txt
+withoutslashes/blahblah.txt blahblah.txt
diff --git a/tests/auto/tools/rcc/data/binary/allfeatures.de_CH.expected b/tests/auto/tools/rcc/data/binary/allfeatures.de_CH.expected
new file mode 100644
index 0000000000..59960d4187
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/allfeatures.de_CH.expected
@@ -0,0 +1,13 @@
+/test/abc/123/+++/currentdir.txt currentdir.txt
+/test/abc/123/+++/currentdir2.txt ./currentdir2.txt
+/test/abc/123/+++/parentdir.txt ../parentdir.txt
+/test/abc/123/+++/subdir/subdir.txt subdir/subdir.txt
+/search_file.txt search_file.txt
+/searchpath1/search_file.txt searchpath1/search_file.txt
+/searchpath2/search_file.txt searchpath2/search_file.txt
+test/testdir.txt test/testdir.txt
+otherdir/otherdir.txt otherdir/otherdir.txt
+aliasdir/aliasdir.txt aliasdir/compressme.txt
+test/test/test1.txt test/test/test1.txt
+test/test/test2.txt test/test/test2.txt
+withoutslashes/blahblah.txt blahblah.txt
diff --git a/tests/auto/tools/rcc/data/binary/allfeatures.expected b/tests/auto/tools/rcc/data/binary/allfeatures.expected
new file mode 100644
index 0000000000..831120c053
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/allfeatures.expected
@@ -0,0 +1,13 @@
+/test/abc/123/+++/currentdir.txt currentdir.txt
+/test/abc/123/+++/currentdir2.txt ./currentdir2.txt
+/test/abc/123/+++/parentdir.txt ../parentdir.txt
+/test/abc/123/+++/subdir/subdir.txt subdir/subdir.txt
+/search_file.txt search_file.txt
+/searchpath1/search_file.txt searchpath1/search_file.txt
+/searchpath2/search_file.txt searchpath2/search_file.txt
+test/testdir.txt test/testdir.txt
+otherdir/otherdir.txt otherdir/otherdir.txt
+aliasdir/aliasdir.txt test/testdir2.txt
+test/test/test1.txt test/test/test1.txt
+test/test/test2.txt test/test/test2.txt
+withoutslashes/blahblah.txt blahblah.txt
diff --git a/tests/auto/tools/rcc/data/binary/allfeatures.ko.expected b/tests/auto/tools/rcc/data/binary/allfeatures.ko.expected
new file mode 100644
index 0000000000..80b42c378e
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/allfeatures.ko.expected
@@ -0,0 +1,13 @@
+/test/abc/123/+++/currentdir.txt currentdir.txt
+/test/abc/123/+++/currentdir2.txt ./currentdir2.txt
+/test/abc/123/+++/parentdir.txt ../parentdir.txt
+/test/abc/123/+++/subdir/subdir.txt subdir/subdir.txt
+/search_file.txt search_file.txt
+/searchpath1/search_file.txt searchpath1/search_file.txt
+/searchpath2/search_file.txt searchpath2/search_file.txt
+test/testdir.txt test/testdir.txt
+otherdir/otherdir.txt otherdir/otherdir.txt
+aliasdir/aliasdir.txt aliasdir/aliasdir.txt
+test/test/test1.txt test/test/test1.txt
+test/test/test2.txt test/test/test2.txt
+withoutslashes/blahblah.txt blahblah.txt
diff --git a/tests/auto/tools/rcc/data/binary/allfeatures.locale b/tests/auto/tools/rcc/data/binary/allfeatures.locale
new file mode 100644
index 0000000000..a6fcbab771
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/allfeatures.locale
@@ -0,0 +1,3 @@
+ko
+de_CH
+de
diff --git a/tests/auto/tools/rcc/data/binary/allfeatures.qrc b/tests/auto/tools/rcc/data/binary/allfeatures.qrc
new file mode 100644
index 0000000000..1b88b1f2cd
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/allfeatures.qrc
@@ -0,0 +1,30 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource prefix="/test/abc/123/+++">
+ <file>currentdir.txt</file>
+ <file>./currentdir2.txt</file>
+ <file>../parentdir.txt</file>
+ <file>subdir/subdir.txt</file>
+ </qresource>
+ <qresource prefix="/">
+ <file>searchpath1/search_file.txt</file>
+ <file>searchpath2/search_file.txt</file>
+ <file>search_file.txt</file>
+ </qresource>
+ <qresource><file>test/testdir.txt</file>
+ <file>otherdir/otherdir.txt</file>
+ <file alias="aliasdir/aliasdir.txt">test/testdir2.txt</file>
+ <file>test/test</file>
+ </qresource>
+ <qresource lang="ko">
+ <file>aliasdir/aliasdir.txt</file>
+ </qresource>
+ <qresource lang="de_CH">
+ <file alias="aliasdir/aliasdir.txt" compress="9" threshold="30">aliasdir/compressme.txt</file>
+ </qresource>
+ <qresource lang="de">
+ <file alias="aliasdir/aliasdir.txt">test/german.txt</file>
+ </qresource>
+ <qresource prefix="withoutslashes">
+ <file>blahblah.txt</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/tools/rcc/data/binary/blahblah.txt b/tests/auto/tools/rcc/data/binary/blahblah.txt
new file mode 100644
index 0000000000..19f0805d8d
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/blahblah.txt
@@ -0,0 +1 @@
+qwerty
diff --git a/tests/auto/tools/rcc/data/binary/currentdir.txt b/tests/auto/tools/rcc/data/binary/currentdir.txt
new file mode 100644
index 0000000000..65f1f43def
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/currentdir.txt
@@ -0,0 +1 @@
+"This is the current dir"
diff --git a/tests/auto/tools/rcc/data/binary/currentdir2.txt b/tests/auto/tools/rcc/data/binary/currentdir2.txt
new file mode 100644
index 0000000000..7d89108011
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/currentdir2.txt
@@ -0,0 +1 @@
+"This is also the current dir"
diff --git a/tests/auto/tools/rcc/data/binary/locale.de.expected b/tests/auto/tools/rcc/data/binary/locale.de.expected
new file mode 100644
index 0000000000..649e56be68
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/locale.de.expected
@@ -0,0 +1,5 @@
+currentdir.txt currentdir.txt
+currentdir2.txt currentdir2.txt
+search_file.txt search_file.txt
+/root/test/testdir.txt test/testdir.txt
+test/testdir2.txt test/testdir2.txt
diff --git a/tests/auto/tools/rcc/data/binary/locale.de_CH.expected b/tests/auto/tools/rcc/data/binary/locale.de_CH.expected
new file mode 100644
index 0000000000..55b57f44d1
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/locale.de_CH.expected
@@ -0,0 +1,6 @@
+currentdir.txt blahblah.txt
+currentdir2.txt currentdir2.txt
+search_file.txt search_file.txt
+/root/test/testdir.txt test/testdir.txt
+test/testdir2.txt test/testdir2.txt
+parentdir.txt ../parentdir.txt
diff --git a/tests/auto/tools/rcc/data/binary/locale.expected b/tests/auto/tools/rcc/data/binary/locale.expected
new file mode 100644
index 0000000000..ef693bc41d
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/locale.expected
@@ -0,0 +1,4 @@
+currentdir.txt currentdir.txt
+search_file.txt search_file.txt
+/root/test/testdir.txt test/testdir.txt
+test/testdir2.txt test/testdir2.txt
diff --git a/tests/auto/tools/rcc/data/binary/locale.it.expected b/tests/auto/tools/rcc/data/binary/locale.it.expected
new file mode 100644
index 0000000000..0a1066e3c4
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/locale.it.expected
@@ -0,0 +1,6 @@
+currentdir.txt currentdir.txt
+search_file.txt search_file.txt
+/root/test/testdir.txt test/testdir.txt
+test/testdir2.txt test/testdir2.txt
+/root/otherdir/otherdir.txt otherdir/otherdir.txt
+/root/currentdir.txt subdir/subdir.txt
diff --git a/tests/auto/tools/rcc/data/binary/locale.locale b/tests/auto/tools/rcc/data/binary/locale.locale
new file mode 100644
index 0000000000..828b9e437c
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/locale.locale
@@ -0,0 +1,3 @@
+de
+de_CH
+it
diff --git a/tests/auto/tools/rcc/data/binary/locale.qrc b/tests/auto/tools/rcc/data/binary/locale.qrc
new file mode 100644
index 0000000000..6cef47b3a2
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/locale.qrc
@@ -0,0 +1,30 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>currentdir.txt</file>
+ </qresource>
+
+ <qresource lang="de"> <file>currentdir2.txt</file> </qresource>
+ <qresource lang="de_CH"> <file>../parentdir.txt</file>
+ <file alias="currentdir.txt">blahblah.txt</file>
+ </qresource>
+
+ <qresource><file>search_file.txt</file></qresource>
+
+ <qresource prefix="/root/">
+
+ <file>test/testdir.txt</file>
+
+ </qresource>
+
+ <qresource>
+ <file>test/testdir2.txt</file>
+ </qresource>
+
+ <qresource prefix="/root/" lang="it">
+ <file>otherdir/otherdir.txt</file>
+ <file alias="currentdir.txt">subdir/subdir.txt</file>
+
+ </qresource>
+
+
+</RCC>
diff --git a/tests/auto/tools/rcc/data/binary/multiple.expected b/tests/auto/tools/rcc/data/binary/multiple.expected
new file mode 100644
index 0000000000..6515e292f6
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/multiple.expected
@@ -0,0 +1,5 @@
+blahblah.txt blahblah.txt
+currentdir.txt currentdir.txt
+currentdir2.txt currentdir2.txt
+subdir/subdir.txt subdir/subdir.txt
+otherdir/otherdir.txt otherdir/otherdir.txt
diff --git a/tests/auto/tools/rcc/data/binary/multiple.qrc b/tests/auto/tools/rcc/data/binary/multiple.qrc
new file mode 100644
index 0000000000..80745ac6ad
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/multiple.qrc
@@ -0,0 +1,10 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>blahblah.txt</file>
+ <file>currentdir.txt</file>
+ <file>currentdir2.txt</file>
+ </qresource>
+ <qresource><file>subdir/subdir.txt</file></qresource>
+ <qresource><file>otherdir/</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/tools/rcc/data/binary/otherdir/otherdir.txt b/tests/auto/tools/rcc/data/binary/otherdir/otherdir.txt
new file mode 100644
index 0000000000..e1b430f33b
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/otherdir/otherdir.txt
@@ -0,0 +1 @@
+"This is the other dir"
diff --git a/tests/auto/tools/rcc/data/binary/prefixes.expected b/tests/auto/tools/rcc/data/binary/prefixes.expected
new file mode 100644
index 0000000000..db07fecbbe
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/prefixes.expected
@@ -0,0 +1,6 @@
+blahblah.txt blahblah.txt
+/myroot/currentdir.txt currentdir.txt
+/myroot/currentdir2.txt currentdir2.txt
+/anotherroot/aliased.txt search_file.txt
+/anotherroot/parentdir.txt ../parentdir.txt
+/myroot/subdir/subdir.txt subdir/subdir.txt
diff --git a/tests/auto/tools/rcc/data/binary/prefixes.qrc b/tests/auto/tools/rcc/data/binary/prefixes.qrc
new file mode 100644
index 0000000000..db6b15ca0c
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/prefixes.qrc
@@ -0,0 +1,21 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>blahblah.txt</file>
+ </qresource>
+
+ <qresource prefix="/myroot/">
+
+ <file>currentdir.txt</file>
+
+ <file>currentdir2.txt</file>
+
+ </qresource>
+
+ <qresource prefix="/anotherroot/">
+
+ <file alias="aliased.txt">search_file.txt</file>
+ <file>../parentdir.txt</file></qresource>
+
+ <qresource prefix="/myroot"><file>subdir/subdir.txt</file></qresource>
+
+</RCC>
diff --git a/tests/auto/tools/rcc/data/binary/search_file.txt b/tests/auto/tools/rcc/data/binary/search_file.txt
new file mode 100644
index 0000000000..d8649da39d
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/search_file.txt
@@ -0,0 +1 @@
+root
diff --git a/tests/auto/tools/rcc/data/binary/searchpath1/search_file.txt b/tests/auto/tools/rcc/data/binary/searchpath1/search_file.txt
new file mode 100644
index 0000000000..3f31b59496
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/searchpath1/search_file.txt
@@ -0,0 +1 @@
+path1
diff --git a/tests/auto/tools/rcc/data/binary/searchpath2/search_file.txt b/tests/auto/tools/rcc/data/binary/searchpath2/search_file.txt
new file mode 100644
index 0000000000..8e3be1fa2e
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/searchpath2/search_file.txt
@@ -0,0 +1 @@
+path2
diff --git a/tests/auto/tools/rcc/data/binary/simple.expected b/tests/auto/tools/rcc/data/binary/simple.expected
new file mode 100644
index 0000000000..913a33ca46
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/simple.expected
@@ -0,0 +1,3 @@
+blahblah.txt blahblah.txt
+currentdir.txt currentdir.txt
+currentdir2.txt currentdir2.txt
diff --git a/tests/auto/tools/rcc/data/binary/simple.qrc b/tests/auto/tools/rcc/data/binary/simple.qrc
new file mode 100644
index 0000000000..0d4da1909f
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/simple.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>blahblah.txt</file>
+ <file>currentdir.txt</file>
+ <file>currentdir2.txt</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/tools/rcc/data/binary/subdir/subdir.txt b/tests/auto/tools/rcc/data/binary/subdir/subdir.txt
new file mode 100644
index 0000000000..4506acf413
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/subdir/subdir.txt
@@ -0,0 +1 @@
+"This is in the sub directory"
diff --git a/tests/auto/tools/rcc/data/binary/test/german.txt b/tests/auto/tools/rcc/data/binary/test/german.txt
new file mode 100644
index 0000000000..12b1cb7320
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/test/german.txt
@@ -0,0 +1 @@
+Deutsch
diff --git a/tests/auto/tools/rcc/data/binary/test/test/test1.txt b/tests/auto/tools/rcc/data/binary/test/test/test1.txt
new file mode 100644
index 0000000000..8baef1b4ab
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/test/test/test1.txt
@@ -0,0 +1 @@
+abc
diff --git a/tests/auto/tools/rcc/data/binary/test/test/test2.txt b/tests/auto/tools/rcc/data/binary/test/test/test2.txt
new file mode 100644
index 0000000000..24c5735c3e
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/test/test/test2.txt
@@ -0,0 +1 @@
+def
diff --git a/tests/auto/tools/rcc/data/binary/test/testdir.txt b/tests/auto/tools/rcc/data/binary/test/testdir.txt
new file mode 100644
index 0000000000..b8cb3a8c01
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/test/testdir.txt
@@ -0,0 +1 @@
+"This is in the test directory"
diff --git a/tests/auto/tools/rcc/data/binary/test/testdir2.txt b/tests/auto/tools/rcc/data/binary/test/testdir2.txt
new file mode 100644
index 0000000000..dccfdc9bcf
--- /dev/null
+++ b/tests/auto/tools/rcc/data/binary/test/testdir2.txt
@@ -0,0 +1 @@
+"This is another file in this directory"
diff --git a/tests/auto/tools/rcc/data/images.bin.expected b/tests/auto/tools/rcc/data/images/images.bin.expected
index cb67a25477..cb67a25477 100644
--- a/tests/auto/tools/rcc/data/images.bin.expected
+++ b/tests/auto/tools/rcc/data/images/images.bin.expected
Binary files differ
diff --git a/tests/auto/tools/rcc/data/images.expected b/tests/auto/tools/rcc/data/images/images.expected
index 71be819310..71be819310 100644
--- a/tests/auto/tools/rcc/data/images.expected
+++ b/tests/auto/tools/rcc/data/images/images.expected
diff --git a/tests/auto/tools/rcc/data/images.qrc b/tests/auto/tools/rcc/data/images/images.qrc
index 773baef3e5..773baef3e5 100644
--- a/tests/auto/tools/rcc/data/images.qrc
+++ b/tests/auto/tools/rcc/data/images/images.qrc
diff --git a/tests/auto/tools/rcc/data/images/circle.png b/tests/auto/tools/rcc/data/images/images/circle.png
index dc392cb3f7..dc392cb3f7 100644
--- a/tests/auto/tools/rcc/data/images/circle.png
+++ b/tests/auto/tools/rcc/data/images/images/circle.png
Binary files differ
diff --git a/tests/auto/tools/rcc/data/images/square.png b/tests/auto/tools/rcc/data/images/images/square.png
index c0fd2d540a..c0fd2d540a 100644
--- a/tests/auto/tools/rcc/data/images/square.png
+++ b/tests/auto/tools/rcc/data/images/images/square.png
Binary files differ
diff --git a/tests/auto/tools/rcc/data/images/subdir/triangle.png b/tests/auto/tools/rcc/data/images/images/subdir/triangle.png
index 2ee15f8f1f..2ee15f8f1f 100644
--- a/tests/auto/tools/rcc/data/images/subdir/triangle.png
+++ b/tests/auto/tools/rcc/data/images/images/subdir/triangle.png
Binary files differ
diff --git a/tests/auto/tools/rcc/data/parentdir.txt b/tests/auto/tools/rcc/data/parentdir.txt
new file mode 100644
index 0000000000..da8195e17b
--- /dev/null
+++ b/tests/auto/tools/rcc/data/parentdir.txt
@@ -0,0 +1 @@
+abcdefgihklmnopqrstuvwxyz
diff --git a/tests/auto/tools/rcc/rcc.pro b/tests/auto/tools/rcc/rcc.pro
index ebe36cfaff..264b8ecc66 100644
--- a/tests/auto/tools/rcc/rcc.pro
+++ b/tests/auto/tools/rcc/rcc.pro
@@ -3,10 +3,3 @@ QT = core testlib
TARGET = tst_rcc
SOURCES += tst_rcc.cpp
-
-wince* {
- DEFINES += SRCDIR=\\\"\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
-
diff --git a/tests/auto/tools/rcc/tst_rcc.cpp b/tests/auto/tools/rcc/tst_rcc.cpp
index 0124b580a8..dbf5cebd9d 100644
--- a/tests/auto/tools/rcc/tst_rcc.cpp
+++ b/tests/auto/tools/rcc/tst_rcc.cpp
@@ -1,5 +1,6 @@
/****************************************************************************
**
+** Copyright (C) 2012 Giuseppe D'Angelo <dangelog@gmail.com>
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
@@ -39,28 +40,34 @@
**
****************************************************************************/
+#include <QtTest/QtTest>
+#include <QtCore/QString>
#include <QtCore/QCoreApplication>
#include <QtCore/QByteArray>
-#include <QtCore/QDebug>
#include <QtCore/QDir>
#include <QtCore/QFile>
#include <QtCore/QProcess>
-#include <QtCore/QTimer>
-
-#include <QtTest/QtTest>
+#include <QtCore/QDirIterator>
+#include <QtCore/QMap>
+#include <QtCore/QList>
+#include <QtCore/QResource>
+#include <QtCore/QLocale>
+typedef QMap<QString, QString> QStringMap;
+Q_DECLARE_METATYPE(QStringMap)
class tst_rcc : public QObject
{
Q_OBJECT
-public:
- tst_rcc() {}
private slots:
void rcc_data();
void rcc();
-};
+ void binary_data();
+ void binary();
+ void cleanupTestCase();
+};
QString findExpectedFile(const QString &base)
{
@@ -95,14 +102,16 @@ static QString doCompare(const QStringList &actual, const QStringList &expected)
return ba;
}
-
void tst_rcc::rcc_data()
{
QTest::addColumn<QString>("directory");
QTest::addColumn<QString>("qrcfile");
QTest::addColumn<QString>("expected");
- QTest::newRow("images") << SRCDIR "data" << "images.qrc" << "images.expected";
+ QString dataPath = QFINDTESTDATA("data/images/");
+ if (dataPath.isEmpty())
+ QFAIL("data path not found");
+ QTest::newRow("images") << dataPath << "images.qrc" << "images.expected";
}
void tst_rcc::rcc()
@@ -157,6 +166,191 @@ void tst_rcc::rcc()
+static void createRccBinaryData(const QString &baseDir, const QString &qrcFileName, const QString &rccFileName)
+{
+ QString currentDir = QDir::currentPath();
+ QDir::setCurrent(baseDir);
+
+ QProcess rccProcess;
+ rccProcess.start("rcc", QStringList() << "-binary" << "-o" << rccFileName << qrcFileName);
+ bool ok = rccProcess.waitForFinished();
+ if (!ok) {
+ QString errorString = QString::fromLatin1("Could not start rcc (is it in PATH?): %1").arg(rccProcess.errorString());
+ QFAIL(qPrintable(errorString));
+ }
+
+ QByteArray output = rccProcess.readAllStandardOutput();
+ if (!output.isEmpty()) {
+ QString errorMessage = QString::fromLatin1("rcc stdout: %1").arg(QString::fromLocal8Bit(output));
+ QWARN(qPrintable(errorMessage));
+ }
+
+ output = rccProcess.readAllStandardError();
+ if (!output.isEmpty()) {
+ QString errorMessage = QString::fromLatin1("rcc stderr: %1").arg(QString::fromLocal8Bit(output));
+ QWARN(qPrintable(errorMessage));
+ }
+
+ QDir::setCurrent(currentDir);
+}
+
+static QStringList readLinesFromFile(const QString &fileName)
+{
+ QFile file(fileName);
+
+ bool ok = file.open(QIODevice::ReadOnly | QIODevice::Text);
+ if (!ok)
+ QWARN(qPrintable(QString::fromLatin1("Could not open testdata file %1: %2").arg(fileName, file.errorString())));
+
+ QStringList lines = QString::fromUtf8(file.readAll()).split(QLatin1Char('\n'), QString::SkipEmptyParts);
+ return lines;
+}
+
+static QStringMap readExpectedFiles(const QString &fileName)
+{
+ QStringMap expectedFiles;
+
+ QStringList lines = readLinesFromFile(fileName);
+ foreach (const QString &line, lines) {
+ QString resourceFileName = line.section(QLatin1Char(' '), 0, 0, QString::SectionSkipEmpty);
+ QString actualFileName = line.section(QLatin1Char(' '), 1, 1, QString::SectionSkipEmpty);
+ expectedFiles[resourceFileName] = actualFileName;
+ }
+
+ return expectedFiles;
+}
+
+/*
+ The following test looks for all *.qrc files under data/binary/. For each
+ .qrc file found, these files are processed (assuming the file found is
+ called "base.qrc"):
+
+ - base.qrc : processed by rcc; creates base.rcc
+ - base.locale : (optional) list of locales to test, one per line
+ - base.expected : list of pairs (file path in resource, path to real file),
+ one per line; the pair separated by a whitespace; the paths to real files
+ relative to data/binary/ (for testing the C locale)
+ - base.localeName.expected : for each localeName in the base.locale file,
+ as the above .expected file
+*/
+
+void tst_rcc::binary_data()
+{
+ QTest::addColumn<QString>("resourceFile");
+ QTest::addColumn<QLocale>("locale");
+ QTest::addColumn<QString>("baseDirectory");
+ QTest::addColumn<QStringMap>("expectedFiles");
+
+ QString dataPath = QFINDTESTDATA("data/binary/");
+ if (dataPath.isEmpty())
+ QFAIL("data path not found");
+
+ QDirIterator iter(dataPath, QStringList() << QLatin1String("*.qrc"));
+ while (iter.hasNext())
+ {
+ iter.next();
+ QFileInfo qrcFileInfo = iter.fileInfo();
+ QString absoluteBaseName = QFileInfo(qrcFileInfo.absolutePath(), qrcFileInfo.baseName()).absoluteFilePath();
+ QString rccFileName = absoluteBaseName + QLatin1String(".rcc");
+ createRccBinaryData(dataPath, qrcFileInfo.absoluteFilePath(), rccFileName);
+
+ QString localeFileName = absoluteBaseName + QLatin1String(".locale");
+ QFile localeFile(localeFileName);
+ if (localeFile.exists()) {
+ QStringList locales = readLinesFromFile(localeFileName);
+ foreach (const QString &locale, locales) {
+ QString expectedFileName = QString::fromLatin1("%1.%2.%3").arg(absoluteBaseName, locale, QLatin1String("expected"));
+ QStringMap expectedFiles = readExpectedFiles(expectedFileName);
+ QTest::newRow(qPrintable(qrcFileInfo.baseName() + QLatin1Char('_') + locale)) << rccFileName
+ << QLocale(locale)
+ << dataPath
+ << expectedFiles;
+ }
+ }
+
+ // always test for the C locale as well
+ QString expectedFileName = absoluteBaseName + QLatin1String(".expected");
+ QStringMap expectedFiles = readExpectedFiles(expectedFileName);
+ QTest::newRow(qPrintable(qrcFileInfo.baseName() + QLatin1String("_C"))) << rccFileName
+ << QLocale::c()
+ << dataPath
+ << expectedFiles;
+ }
+}
+
+void tst_rcc::binary()
+{
+ QFETCH(QString, baseDirectory);
+ QFETCH(QString, resourceFile);
+ QFETCH(QLocale, locale);
+ QFETCH(QStringMap, expectedFiles);
+
+ const QString rootPrefix = QLatin1String("/test_root/");
+ const QString resourceRootPrefix = QLatin1Char(':') + rootPrefix;
+
+ QLocale oldDefaultLocale;
+ QLocale::setDefault(locale);
+ QVERIFY(QFile::exists(resourceFile));
+ QVERIFY(QResource::registerResource(resourceFile, rootPrefix));
+
+ { // need to destroy the iterators on the resource, in order to be able to unregister it
+
+ // read all the files inside the resources
+ QDirIterator iter(resourceRootPrefix, QDir::Files, QDirIterator::Subdirectories);
+ QList<QString> filesFound;
+ while (iter.hasNext())
+ filesFound << iter.next();
+
+ // add the test root prefix to the expected file names
+ QList<QString> expectedFileNames = expectedFiles.keys();
+ for (QList<QString>::iterator i = expectedFileNames.begin(); i < expectedFileNames.end(); ++i) {
+ // poor man's canonicalPath, which doesn't work with resources
+ if ((*i).startsWith(QLatin1Char('/')))
+ (*i).remove(0, 1);
+ *i = resourceRootPrefix + *i;
+ }
+
+ // check that we have all (and only) the expected files
+ qSort(filesFound);
+ qSort(expectedFileNames);
+ QCOMPARE(filesFound, expectedFileNames);
+
+ // now actually check the file contents
+ QDir directory(baseDirectory);
+ for (QStringMap::const_iterator i = expectedFiles.constBegin(); i != expectedFiles.constEnd(); ++i) {
+ QString resourceFileName = i.key();
+ QString actualFileName = i.value();
+
+ QFile resourceFile(resourceRootPrefix + resourceFileName);
+ QVERIFY(resourceFile.open(QIODevice::ReadOnly));
+ QByteArray resourceData = resourceFile.readAll();
+ resourceFile.close();
+
+ QFile actualFile(QFileInfo(directory, actualFileName).absoluteFilePath());
+ QVERIFY(actualFile.open(QIODevice::ReadOnly));
+ QByteArray actualData = actualFile.readAll();
+ actualFile.close();
+ QCOMPARE(resourceData, actualData);
+ }
+
+ }
+
+ QVERIFY(QResource::unregisterResource(resourceFile, rootPrefix));
+ QLocale::setDefault(oldDefaultLocale);
+}
+
+
+void tst_rcc::cleanupTestCase()
+{
+ QString dataPath = QFINDTESTDATA("data/binary/");
+ if (dataPath.isEmpty())
+ return;
+ QDir dataDir(dataPath);
+ QFileInfoList entries = dataDir.entryInfoList(QStringList() << QLatin1String("*.rcc"));
+ foreach (const QFileInfo &entry, entries)
+ QFile::remove(entry.absoluteFilePath());
+}
+
QTEST_APPLESS_MAIN(tst_rcc)
#include "tst_rcc.moc"
diff --git a/tests/auto/widgets/effects/effects.pro b/tests/auto/widgets/effects/effects.pro
index fab24d6296..e598707f3e 100644
--- a/tests/auto/widgets/effects/effects.pro
+++ b/tests/auto/widgets/effects/effects.pro
@@ -1,4 +1,5 @@
TEMPLATE=subdirs
SUBDIRS=\
qgraphicseffect \
+ qpixmapfilter \
diff --git a/tests/auto/gui/image/qpixmapfilter/noise.png b/tests/auto/widgets/effects/qpixmapfilter/noise.png
index 1bebaf528e..1bebaf528e 100644
--- a/tests/auto/gui/image/qpixmapfilter/noise.png
+++ b/tests/auto/widgets/effects/qpixmapfilter/noise.png
Binary files differ
diff --git a/tests/auto/gui/image/qpixmapfilter/qpixmapfilter.pro b/tests/auto/widgets/effects/qpixmapfilter/qpixmapfilter.pro
index 872686b82f..872686b82f 100644
--- a/tests/auto/gui/image/qpixmapfilter/qpixmapfilter.pro
+++ b/tests/auto/widgets/effects/qpixmapfilter/qpixmapfilter.pro
diff --git a/tests/auto/gui/image/qpixmapfilter/tst_qpixmapfilter.cpp b/tests/auto/widgets/effects/qpixmapfilter/tst_qpixmapfilter.cpp
index c9b2e054da..c9b2e054da 100644
--- a/tests/auto/gui/image/qpixmapfilter/tst_qpixmapfilter.cpp
+++ b/tests/auto/widgets/effects/qpixmapfilter/tst_qpixmapfilter.cpp
diff --git a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
index 220c89ec2f..daa06d0762 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -2153,7 +2153,7 @@ void tst_QGraphicsScene::mouseEventPropagation_doubleclick()
class Scene : public QGraphicsScene
{
public:
- QList<QPointF> mouseMovePoints;
+ QVector<QPointF> mouseMovePoints;
protected:
void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
diff --git a/tests/auto/widgets/kernel/kernel.pro b/tests/auto/widgets/kernel/kernel.pro
index 850863c112..3a00300ac3 100644
--- a/tests/auto/widgets/kernel/kernel.pro
+++ b/tests/auto/widgets/kernel/kernel.pro
@@ -13,6 +13,7 @@ SUBDIRS=\
qwidget \
qwidget_window \
qwidgetaction \
+ qicon \
SUBDIRS -= qsound
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index 9bbb6aa7f6..91ecbf23a2 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -2160,7 +2160,9 @@ void tst_QApplication::abortQuitOnShow()
Q_GLOBAL_STATIC(QLocale, tst_qapp_locale);
Q_GLOBAL_STATIC(QProcess, tst_qapp_process);
Q_GLOBAL_STATIC(QFileSystemWatcher, tst_qapp_fileSystemWatcher);
+#ifndef QT_NO_SHAREDMEMORY
Q_GLOBAL_STATIC(QSharedMemory, tst_qapp_sharedMemory);
+#endif
Q_GLOBAL_STATIC(QElapsedTimer, tst_qapp_elapsedTimer);
Q_GLOBAL_STATIC(QMutex, tst_qapp_mutex);
Q_GLOBAL_STATIC(QWidget, tst_qapp_widget);
@@ -2177,7 +2179,9 @@ void tst_QApplication::globalStaticObjectDestruction()
QVERIFY(tst_qapp_locale());
QVERIFY(tst_qapp_process());
QVERIFY(tst_qapp_fileSystemWatcher());
+#ifndef QT_NO_SHAREDMEMORY
QVERIFY(tst_qapp_sharedMemory());
+#endif
QVERIFY(tst_qapp_elapsedTimer());
QVERIFY(tst_qapp_mutex());
QVERIFY(tst_qapp_widget());
diff --git a/tests/auto/gui/image/qicon/.gitignore b/tests/auto/widgets/kernel/qicon/.gitignore
index c101ef9d28..c101ef9d28 100644
--- a/tests/auto/gui/image/qicon/.gitignore
+++ b/tests/auto/widgets/kernel/qicon/.gitignore
diff --git a/tests/auto/gui/image/qicon/icons/testtheme/16x16/actions/appointment-new.png b/tests/auto/widgets/kernel/qicon/icons/testtheme/16x16/actions/appointment-new.png
index 18b7c6781e..18b7c6781e 100644
--- a/tests/auto/gui/image/qicon/icons/testtheme/16x16/actions/appointment-new.png
+++ b/tests/auto/widgets/kernel/qicon/icons/testtheme/16x16/actions/appointment-new.png
Binary files differ
diff --git a/tests/auto/gui/image/qicon/icons/testtheme/22x22/actions/appointment-new.png b/tests/auto/widgets/kernel/qicon/icons/testtheme/22x22/actions/appointment-new.png
index d676ffd463..d676ffd463 100644
--- a/tests/auto/gui/image/qicon/icons/testtheme/22x22/actions/appointment-new.png
+++ b/tests/auto/widgets/kernel/qicon/icons/testtheme/22x22/actions/appointment-new.png
Binary files differ
diff --git a/tests/auto/gui/image/qicon/icons/testtheme/32x32/actions/appointment-new.png b/tests/auto/widgets/kernel/qicon/icons/testtheme/32x32/actions/appointment-new.png
index 85daef3b0b..85daef3b0b 100644
--- a/tests/auto/gui/image/qicon/icons/testtheme/32x32/actions/appointment-new.png
+++ b/tests/auto/widgets/kernel/qicon/icons/testtheme/32x32/actions/appointment-new.png
Binary files differ
diff --git a/tests/auto/gui/image/qicon/icons/testtheme/index.theme b/tests/auto/widgets/kernel/qicon/icons/testtheme/index.theme
index e18736ab43..e18736ab43 100644
--- a/tests/auto/gui/image/qicon/icons/testtheme/index.theme
+++ b/tests/auto/widgets/kernel/qicon/icons/testtheme/index.theme
diff --git a/tests/auto/gui/image/qicon/icons/testtheme/scalable/actions/svg-only.svg b/tests/auto/widgets/kernel/qicon/icons/testtheme/scalable/actions/svg-only.svg
index 4cb14f82f0..4cb14f82f0 100644
--- a/tests/auto/gui/image/qicon/icons/testtheme/scalable/actions/svg-only.svg
+++ b/tests/auto/widgets/kernel/qicon/icons/testtheme/scalable/actions/svg-only.svg
diff --git a/tests/auto/gui/image/qicon/icons/themeparent/16x16/actions/address-book-new.png b/tests/auto/widgets/kernel/qicon/icons/themeparent/16x16/actions/address-book-new.png
index 2098cfdf36..2098cfdf36 100644
--- a/tests/auto/gui/image/qicon/icons/themeparent/16x16/actions/address-book-new.png
+++ b/tests/auto/widgets/kernel/qicon/icons/themeparent/16x16/actions/address-book-new.png
Binary files differ
diff --git a/tests/auto/gui/image/qicon/icons/themeparent/16x16/actions/appointment-new.png b/tests/auto/widgets/kernel/qicon/icons/themeparent/16x16/actions/appointment-new.png
index 18b7c6781e..18b7c6781e 100644
--- a/tests/auto/gui/image/qicon/icons/themeparent/16x16/actions/appointment-new.png
+++ b/tests/auto/widgets/kernel/qicon/icons/themeparent/16x16/actions/appointment-new.png
Binary files differ
diff --git a/tests/auto/gui/image/qicon/icons/themeparent/22x22/actions/address-book-new.png b/tests/auto/widgets/kernel/qicon/icons/themeparent/22x22/actions/address-book-new.png
index fad446cd92..fad446cd92 100644
--- a/tests/auto/gui/image/qicon/icons/themeparent/22x22/actions/address-book-new.png
+++ b/tests/auto/widgets/kernel/qicon/icons/themeparent/22x22/actions/address-book-new.png
Binary files differ
diff --git a/tests/auto/gui/image/qicon/icons/themeparent/22x22/actions/appointment-new.png b/tests/auto/widgets/kernel/qicon/icons/themeparent/22x22/actions/appointment-new.png
index d676ffd463..d676ffd463 100644
--- a/tests/auto/gui/image/qicon/icons/themeparent/22x22/actions/appointment-new.png
+++ b/tests/auto/widgets/kernel/qicon/icons/themeparent/22x22/actions/appointment-new.png
Binary files differ
diff --git a/tests/auto/gui/image/qicon/icons/themeparent/32x32/actions/address-book-new.png b/tests/auto/widgets/kernel/qicon/icons/themeparent/32x32/actions/address-book-new.png
index 420139d307..420139d307 100644
--- a/tests/auto/gui/image/qicon/icons/themeparent/32x32/actions/address-book-new.png
+++ b/tests/auto/widgets/kernel/qicon/icons/themeparent/32x32/actions/address-book-new.png
Binary files differ
diff --git a/tests/auto/gui/image/qicon/icons/themeparent/32x32/actions/appointment-new.png b/tests/auto/widgets/kernel/qicon/icons/themeparent/32x32/actions/appointment-new.png
index 85daef3b0b..85daef3b0b 100644
--- a/tests/auto/gui/image/qicon/icons/themeparent/32x32/actions/appointment-new.png
+++ b/tests/auto/widgets/kernel/qicon/icons/themeparent/32x32/actions/appointment-new.png
Binary files differ
diff --git a/tests/auto/gui/image/qicon/icons/themeparent/index.theme b/tests/auto/widgets/kernel/qicon/icons/themeparent/index.theme
index e536a0bf2f..e536a0bf2f 100644
--- a/tests/auto/gui/image/qicon/icons/themeparent/index.theme
+++ b/tests/auto/widgets/kernel/qicon/icons/themeparent/index.theme
diff --git a/tests/auto/gui/image/qicon/icons/themeparent/scalable/actions/address-book-new.svg b/tests/auto/widgets/kernel/qicon/icons/themeparent/scalable/actions/address-book-new.svg
index 600a82c1b0..600a82c1b0 100644
--- a/tests/auto/gui/image/qicon/icons/themeparent/scalable/actions/address-book-new.svg
+++ b/tests/auto/widgets/kernel/qicon/icons/themeparent/scalable/actions/address-book-new.svg
diff --git a/tests/auto/gui/image/qicon/icons/themeparent/scalable/actions/appointment-new.svg b/tests/auto/widgets/kernel/qicon/icons/themeparent/scalable/actions/appointment-new.svg
index 4cb14f82f0..4cb14f82f0 100644
--- a/tests/auto/gui/image/qicon/icons/themeparent/scalable/actions/appointment-new.svg
+++ b/tests/auto/widgets/kernel/qicon/icons/themeparent/scalable/actions/appointment-new.svg
diff --git a/tests/auto/gui/image/qicon/image.png b/tests/auto/widgets/kernel/qicon/image.png
index 8d703640c1..8d703640c1 100644
--- a/tests/auto/gui/image/qicon/image.png
+++ b/tests/auto/widgets/kernel/qicon/image.png
Binary files differ
diff --git a/tests/auto/gui/image/qicon/qicon.pro b/tests/auto/widgets/kernel/qicon/qicon.pro
index c44c080ced..c44c080ced 100644
--- a/tests/auto/gui/image/qicon/qicon.pro
+++ b/tests/auto/widgets/kernel/qicon/qicon.pro
diff --git a/tests/auto/gui/image/qicon/rect.png b/tests/auto/widgets/kernel/qicon/rect.png
index b5d3ecbddf..b5d3ecbddf 100644
--- a/tests/auto/gui/image/qicon/rect.png
+++ b/tests/auto/widgets/kernel/qicon/rect.png
Binary files differ
diff --git a/tests/auto/gui/image/qicon/tst_qicon.cpp b/tests/auto/widgets/kernel/qicon/tst_qicon.cpp
index 4a9ab93921..4a9ab93921 100644
--- a/tests/auto/gui/image/qicon/tst_qicon.cpp
+++ b/tests/auto/widgets/kernel/qicon/tst_qicon.cpp
diff --git a/tests/auto/gui/image/qicon/tst_qicon.qrc b/tests/auto/widgets/kernel/qicon/tst_qicon.qrc
index 7925a33c84..7925a33c84 100644
--- a/tests/auto/gui/image/qicon/tst_qicon.qrc
+++ b/tests/auto/widgets/kernel/qicon/tst_qicon.qrc
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index dab9dd7690..49c93f8f03 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -68,6 +68,7 @@
#include <QtGui/qguiapplication.h>
#include <qmenubar.h>
#include <qtableview.h>
+#include <qtreewidget.h>
#include <QtWidgets/QGraphicsView>
#include <QtWidgets/QGraphicsProxyWidget>
@@ -412,6 +413,7 @@ private slots:
void taskQTBUG_17333_ResizeInfiniteRecursion();
void nativeChildFocus();
+ void grab();
private:
bool ensureScreenSize(int width, int height);
@@ -9288,5 +9290,78 @@ void tst_QWidget::nativeChildFocus()
QTest::qWait(1000);
}
+static bool lenientCompare(const QPixmap &actual, const QPixmap &expected)
+{
+ QImage expectedImage = expected.toImage().convertToFormat(QImage::Format_RGB32);
+ QImage actualImage = actual.toImage().convertToFormat(QImage::Format_RGB32);
+
+ if (expectedImage.size() != actualImage.size()) {
+ qWarning("Image size comparison failed: expected: %dx%d, got %dx%d",
+ expectedImage.size().width(), expectedImage.size().height(),
+ actualImage.size().width(), actualImage.size().height());
+ return false;
+ }
+
+ const int size = actual.width() * actual.height();
+ const int threshold = QPixmap::defaultDepth() == 16 ? 10 : 2;
+
+ QRgb *a = (QRgb *)actualImage.bits();
+ QRgb *e = (QRgb *)expectedImage.bits();
+ for (int i = 0; i < size; ++i) {
+ const QColor ca(a[i]);
+ const QColor ce(e[i]);
+ if (qAbs(ca.red() - ce.red()) > threshold
+ || qAbs(ca.green() - ce.green()) > threshold
+ || qAbs(ca.blue() - ce.blue()) > threshold) {
+ qWarning("Color mismatch at pixel #%d: Expected: %d,%d,%d, got %d,%d,%d",
+ i, ce.red(), ce.green(), ce.blue(), ca.red(), ca.green(), ca.blue());
+ return false;
+ }
+ }
+
+ return true;
+}
+
+void tst_QWidget::grab()
+{
+ for (int opaque = 0; opaque < 2; ++opaque) {
+ QWidget widget;
+ QImage image(128, 128, opaque ? QImage::Format_RGB32 : QImage::Format_ARGB32_Premultiplied);
+ for (int row = 0; row < image.height(); ++row) {
+ QRgb *line = reinterpret_cast<QRgb *>(image.scanLine(row));
+ for (int col = 0; col < image.width(); ++col)
+ line[col] = qRgba(rand() & 255, row, col, opaque ? 255 : 127);
+ }
+
+ QPalette pal = widget.palette();
+ pal.setBrush(QPalette::Window, QBrush(image));
+ widget.setPalette(pal);
+ widget.resize(128, 128);
+
+ QPixmap expected(64, 64);
+ if (!opaque)
+ expected.fill(Qt::transparent);
+
+ QPainter p(&expected);
+ p.translate(-64, -64);
+ p.drawTiledPixmap(0, 0, 128, 128, pal.brush(QPalette::Window).texture(), 0, 0);
+ p.end();
+
+ QPixmap actual = widget.grab(QRect(64, 64, 64, 64));
+ QVERIFY(lenientCompare(actual, expected));
+
+ actual = widget.grab(QRect(64, 64, -1, -1));
+ QVERIFY(lenientCompare(actual, expected));
+
+ // Make sure a widget that is not yet shown is grabbed correctly.
+ QTreeWidget widget2;
+ actual = widget2.grab(QRect());
+ widget2.show();
+ expected = widget2.grab(QRect());
+
+ QVERIFY(lenientCompare(actual, expected));
+ }
+}
+
QTEST_MAIN(tst_QWidget)
#include "tst_qwidget.moc"
diff --git a/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro b/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro
index dd17183b30..c96004bd5d 100644
--- a/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro
+++ b/tests/auto/widgets/styles/qstylesheetstyle/qstylesheetstyle.pro
@@ -6,5 +6,3 @@ SOURCES += tst_qstylesheetstyle.cpp
RESOURCES += resources.qrc
requires(contains(QT_CONFIG,private_tests))
-
-win32:CONFIG += insignificant_test # QTBUG-24323
diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
index 544923a1c3..3bff332252 100644
--- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
+++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
@@ -728,22 +728,27 @@ void tst_QStyleSheetStyle::focusColors()
// is reached if at least ten pixels of the right color can be found in
// the image.
// For this reason, we use unusual and extremely ugly colors! :-)
+ // Note that in case of anti-aliased text, ensuring that we have at least
+ // ten pixels of the right color requires quite a many characters, as the
+ // majority of the pixels will have slightly different colors due to the
+ // anti-aliasing effect.
#if !defined(Q_OS_WIN32) && !defined(Q_OS_MAC) && !(defined(Q_OS_LINUX) && defined(Q_CC_GNU) && !defined(Q_CC_INTEL))
QSKIP("This is a fragile test which fails on many esoteric platforms because of focus problems. "
"That doesn't mean that the feature doesn't work in practice.");
#endif
QList<QWidget *> widgets;
- widgets << new QPushButton("TESTING");
- widgets << new QLineEdit("TESTING");
- widgets << new QLabel("TESTING");
+ widgets << new QPushButton("TESTING TESTING");
+ widgets << new QLineEdit("TESTING TESTING");
+ widgets << new QLabel("TESTING TESTING");
QSpinBox *spinbox = new QSpinBox;
- spinbox->setValue(8888);
+ spinbox->setMaximum(1000000000);
+ spinbox->setValue(123456789);
widgets << spinbox;
QComboBox *combobox = new QComboBox;
combobox->setEditable(true);
- combobox->addItems(QStringList() << "TESTING");
+ combobox->addItems(QStringList() << "TESTING TESTING");
widgets << combobox;
- widgets << new QLabel("TESTING");
+ widgets << new QLabel("TESTING TESTING");
#ifdef Q_WS_QWS
// QWS has its own special focus logic which is slightly different
@@ -794,17 +799,18 @@ void tst_QStyleSheetStyle::hoverColors()
if (!PlatformQuirks::haveMouseCursor())
QSKIP("No mouse Cursor on this platform");
QList<QWidget *> widgets;
- widgets << new QPushButton("TESTING");
- widgets << new QLineEdit("TESTING");
- widgets << new QLabel("TESTING");
+ widgets << new QPushButton("TESTING TESTING");
+ widgets << new QLineEdit("TESTING TESTING");
+ widgets << new QLabel("TESTING TESTING");
QSpinBox *spinbox = new QSpinBox;
- spinbox->setValue(8888);
+ spinbox->setMaximum(1000000000);
+ spinbox->setValue(123456789);
widgets << spinbox;
QComboBox *combobox = new QComboBox;
combobox->setEditable(true);
- combobox->addItems(QStringList() << "TESTING");
+ combobox->addItems(QStringList() << "TESTING TESTING");
widgets << combobox;
- widgets << new QLabel("<b>TESTING</b>");
+ widgets << new QLabel("<b>TESTING TESTING</b>");
foreach (QWidget *widget, widgets) {
//without Qt::X11BypassWindowManagerHint the window manager may move the window after we moved the cursor
diff --git a/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp b/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp
index cfafa9ea47..1f717727b0 100644
--- a/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp
+++ b/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp
@@ -120,14 +120,14 @@ void tst_QSystemTrayIcon::getSetCheck()
void tst_QSystemTrayIcon::supportsMessages()
{
// ### fixme: Check platforms.
- QEXPECT_FAIL("", "QTBUG-20978 QSystemTrayIcon is unimplemented for qpa", Abort);
-
-#if !defined(Q_WS_QWS)
- QCOMPARE(QSystemTrayIcon::supportsMessages(), true );
+#if defined(Q_WS_QWS)
+ QCOMPARE(QSystemTrayIcon::supportsMessages(), false);
+#elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+ QCOMPARE(QSystemTrayIcon::supportsMessages(), true);
#else
- QCOMPARE(QSystemTrayIcon::supportsMessages(), false );
+ QEXPECT_FAIL("", "QTBUG-20978 QSystemTrayIcon is unimplemented for qpa", Abort);
+ QCOMPARE(QSystemTrayIcon::supportsMessages(), true);
#endif
-
}
void tst_QSystemTrayIcon::lastWindowClosed()
diff --git a/tests/auto/widgets/widgets/qmenubar/qmenubar.pro b/tests/auto/widgets/widgets/qmenubar/qmenubar.pro
index 6f35d4516f..6bacaa0d37 100644
--- a/tests/auto/widgets/widgets/qmenubar/qmenubar.pro
+++ b/tests/auto/widgets/widgets/qmenubar/qmenubar.pro
@@ -5,5 +5,3 @@ SOURCES += tst_qmenubar.cpp
# QTBUG-4965, QTBUG-11823 - unstable tests
linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test
-
-win32:CONFIG += insignificant_test # QTBUG-24326
diff --git a/tests/auto/widgets/widgets/qtextedit/qtextedit.pro b/tests/auto/widgets/widgets/qtextedit/qtextedit.pro
index 294f1d84e7..85658c222e 100644
--- a/tests/auto/widgets/widgets/qtextedit/qtextedit.pro
+++ b/tests/auto/widgets/widgets/qtextedit/qtextedit.pro
@@ -17,5 +17,3 @@ wince* {
}
contains(QT_CONFIG,xcb):CONFIG+=insignificant_test # QTBUG-20756 crashes on xcb
-
-win32:CONFIG += insignificant_test # QTBUG-24348
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h
index b13f4a11e1..d2d859b402 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/benchapps/chipTest/chip.h
@@ -62,7 +62,7 @@ protected:
private:
int x, y;
QColor color;
- QList<QPointF> stuff;
+ QVector<QPointF> stuff;
};
#endif
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h
index ef3550e8d7..462109e599 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chip.h
@@ -62,7 +62,7 @@ protected:
private:
int x, y;
QColor color;
- QList<QPointF> stuff;
+ QVector<QPointF> stuff;
};
#endif
diff --git a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp
index cae21fcfac..f8d766d82a 100644
--- a/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp
+++ b/tests/benchmarks/gui/graphicsview/qgraphicsview/chiptester/chiptester.cpp
@@ -43,6 +43,7 @@
#include "chip.h"
#include <QtGui>
+#include <QScrollBar>
#ifndef QT_NO_OPENGL
#include <QtOpenGL>
#endif
diff --git a/tests/benchmarks/gui/image/qimagereader/qimagereader.pro b/tests/benchmarks/gui/image/qimagereader/qimagereader.pro
index cc2c8e0701..87c9de5461 100644
--- a/tests/benchmarks/gui/image/qimagereader/qimagereader.pro
+++ b/tests/benchmarks/gui/image/qimagereader/qimagereader.pro
@@ -14,11 +14,11 @@ wince*: {
addFiles.path = .
CONFIG(debug, debug|release):{
- imageFormatsPlugins.files = $$(QTDIR)/plugins/imageformats/*d4.dll
+ imageFormatsPlugins.files = $$QT_BUILD_TREE/plugins/imageformats/*d4.dll
}
CONFIG(release, debug|release):{
- imageFormatsPlugins.files = $$(QTDIR)/plugins/imageformats/*[^d]4.dll
+ imageFormatsPlugins.files = $$QT_BUILD_TREE/plugins/imageformats/*[^d]4.dll
}
imageFormatsPlugins.path = imageformats
DEPLOYMENT += addFiles imageFormatsPlugins