summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/animation/qparallelanimationgroup/BLACKLIST1
-rw-r--r--tests/auto/corelib/animation/qpauseanimation/BLACKLIST11
-rw-r--r--tests/auto/corelib/animation/qpropertyanimation/BLACKLIST6
-rw-r--r--tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST8
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp2
-rw-r--r--tests/auto/corelib/corelib.pro1
-rw-r--r--tests/auto/corelib/global/qlogging/tst_qlogging.cpp4
-rw-r--r--tests/auto/corelib/io/qdebug/tst_qdebug.cpp2
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp2
-rw-r--r--tests/auto/corelib/io/qfile/BLACKLIST7
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/BLACKLIST5
-rw-r--r--tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp2
-rw-r--r--tests/auto/corelib/io/qprocess/BLACKLIST8
-rw-r--r--tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp10
-rw-r--r--tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp34
-rw-r--r--tests/auto/corelib/io/qsettings/tst_qsettings.cpp4
-rw-r--r--tests/auto/corelib/kernel/qelapsedtimer/BLACKLIST4
-rw-r--r--tests/auto/corelib/kernel/qeventdispatcher/BLACKLIST6
-rw-r--r--tests/auto/corelib/kernel/qeventloop/BLACKLIST2
-rw-r--r--tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp6
-rw-r--r--tests/auto/corelib/kernel/qmetatype/qmetatype.pro1
-rw-r--r--tests/auto/corelib/kernel/qobject/BLACKLIST2
-rw-r--r--tests/auto/corelib/kernel/qobject/tst_qobject.cpp1
-rw-r--r--tests/auto/corelib/kernel/qsocketnotifier/BLACKLIST5
-rw-r--r--tests/auto/corelib/kernel/qtimer/BLACKLIST10
-rw-r--r--tests/auto/corelib/kernel/qvariant/qvariant.pro1
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp2
-rw-r--r--tests/auto/corelib/serialization/json/tst_qtjson.cpp62
-rw-r--r--tests/auto/corelib/serialization/qcborstreamreader/tst_qcborstreamreader.cpp108
-rw-r--r--tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp79
-rw-r--r--tests/auto/corelib/serialization/qdatastream/qdatastream.pro2
-rw-r--r--tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp8
-rw-r--r--tests/auto/corelib/serialization/qtextstream/BLACKLIST3
-rw-r--r--tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp2
-rw-r--r--tests/auto/corelib/text/qbytearray/.gitattributes (renamed from tests/auto/corelib/tools/qbytearray/.gitattributes)0
-rw-r--r--tests/auto/corelib/text/qbytearray/.gitignore (renamed from tests/auto/corelib/tools/qbytearray/.gitignore)0
-rw-r--r--tests/auto/corelib/text/qbytearray/android_testdata.qrc (renamed from tests/auto/corelib/tools/qbytearray/android_testdata.qrc)0
-rw-r--r--tests/auto/corelib/text/qbytearray/qbytearray.pro (renamed from tests/auto/corelib/tools/qbytearray/qbytearray.pro)0
-rw-r--r--tests/auto/corelib/text/qbytearray/rfc3252.txt (renamed from tests/auto/corelib/tools/qbytearray/rfc3252.txt)0
-rw-r--r--tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp (renamed from tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp)0
-rw-r--r--tests/auto/corelib/text/qbytearray/tst_qbytearray_mac.mm (renamed from tests/auto/corelib/tools/qbytearray/tst_qbytearray_mac.mm)0
-rw-r--r--tests/auto/corelib/text/qbytearraylist/qbytearraylist.pro (renamed from tests/auto/corelib/tools/qbytearraylist/qbytearraylist.pro)0
-rw-r--r--tests/auto/corelib/text/qbytearraylist/tst_qbytearraylist.cpp (renamed from tests/auto/corelib/tools/qbytearraylist/tst_qbytearraylist.cpp)0
-rw-r--r--tests/auto/corelib/text/qbytearraymatcher/qbytearraymatcher.pro (renamed from tests/auto/corelib/tools/qbytearraymatcher/qbytearraymatcher.pro)0
-rw-r--r--tests/auto/corelib/text/qbytearraymatcher/tst_qbytearraymatcher.cpp (renamed from tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp)0
-rw-r--r--tests/auto/corelib/text/qbytedatabuffer/.gitignore (renamed from tests/auto/corelib/tools/qbytedatabuffer/.gitignore)0
-rw-r--r--tests/auto/corelib/text/qbytedatabuffer/qbytedatabuffer.pro (renamed from tests/auto/corelib/tools/qbytedatabuffer/qbytedatabuffer.pro)0
-rw-r--r--tests/auto/corelib/text/qbytedatabuffer/tst_qbytedatabuffer.cpp (renamed from tests/auto/corelib/tools/qbytedatabuffer/tst_qbytedatabuffer.cpp)0
-rw-r--r--tests/auto/corelib/text/qchar/.gitignore (renamed from tests/auto/corelib/tools/qchar/.gitignore)0
-rw-r--r--tests/auto/corelib/text/qchar/data/NormalizationTest.txt (renamed from tests/auto/corelib/tools/qchar/data/NormalizationTest.txt)0
-rw-r--r--tests/auto/corelib/text/qchar/qchar.pro (renamed from tests/auto/corelib/tools/qchar/qchar.pro)0
-rw-r--r--tests/auto/corelib/text/qchar/testdata.qrc (renamed from tests/auto/corelib/tools/qchar/testdata.qrc)0
-rw-r--r--tests/auto/corelib/text/qchar/tst_qchar.cpp (renamed from tests/auto/corelib/tools/qchar/tst_qchar.cpp)0
-rw-r--r--tests/auto/corelib/text/qcollator/qcollator.pro (renamed from tests/auto/corelib/tools/qcollator/qcollator.pro)0
-rw-r--r--tests/auto/corelib/text/qcollator/tst_qcollator.cpp (renamed from tests/auto/corelib/tools/qcollator/tst_qcollator.cpp)0
-rw-r--r--tests/auto/corelib/text/qlatin1string/.gitignore (renamed from tests/auto/corelib/tools/qlatin1string/.gitignore)0
-rw-r--r--tests/auto/corelib/text/qlatin1string/qlatin1string.pro (renamed from tests/auto/corelib/tools/qlatin1string/qlatin1string.pro)0
-rw-r--r--tests/auto/corelib/text/qlatin1string/tst_qlatin1string.cpp (renamed from tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp)0
-rw-r--r--tests/auto/corelib/text/qlocale/.gitignore (renamed from tests/auto/corelib/tools/qlocale/.gitignore)0
-rw-r--r--tests/auto/corelib/text/qlocale/qlocale.pro (renamed from tests/auto/corelib/tools/qlocale/qlocale.pro)0
-rw-r--r--tests/auto/corelib/text/qlocale/syslocaleapp/syslocaleapp.cpp (renamed from tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.cpp)0
-rw-r--r--tests/auto/corelib/text/qlocale/syslocaleapp/syslocaleapp.pro (renamed from tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.pro)0
-rw-r--r--tests/auto/corelib/text/qlocale/test/test.pro (renamed from tests/auto/corelib/tools/qlocale/test/test.pro)0
-rw-r--r--tests/auto/corelib/text/qlocale/tst_qlocale.cpp (renamed from tests/auto/corelib/tools/qlocale/tst_qlocale.cpp)4
-rw-r--r--tests/auto/corelib/text/qregexp/.gitignore (renamed from tests/auto/corelib/tools/qregexp/.gitignore)0
-rw-r--r--tests/auto/corelib/text/qregexp/qregexp.pro (renamed from tests/auto/corelib/tools/qregexp/qregexp.pro)0
-rw-r--r--tests/auto/corelib/text/qregexp/tst_qregexp.cpp (renamed from tests/auto/corelib/tools/qregexp/tst_qregexp.cpp)0
-rw-r--r--tests/auto/corelib/text/qregularexpression/.gitignore (renamed from tests/auto/corelib/tools/qregularexpression/.gitignore)0
-rw-r--r--tests/auto/corelib/text/qregularexpression/qregularexpression.pro (renamed from tests/auto/corelib/tools/qregularexpression/qregularexpression.pro)0
-rw-r--r--tests/auto/corelib/text/qregularexpression/tst_qregularexpression.cpp (renamed from tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp)0
-rw-r--r--tests/auto/corelib/text/qstring/.gitignore (renamed from tests/auto/corelib/tools/qstring/.gitignore)0
-rw-r--r--tests/auto/corelib/text/qstring/double_data.h (renamed from tests/auto/corelib/tools/qstring/double_data.h)0
-rw-r--r--tests/auto/corelib/text/qstring/qstring.pro (renamed from tests/auto/corelib/tools/qstring/qstring.pro)0
-rw-r--r--tests/auto/corelib/text/qstring/tst_qstring.cpp (renamed from tests/auto/corelib/tools/qstring/tst_qstring.cpp)6
-rw-r--r--tests/auto/corelib/text/qstring/tst_qstring_mac.mm (renamed from tests/auto/corelib/tools/qstring/tst_qstring_mac.mm)0
-rw-r--r--tests/auto/corelib/text/qstring_no_cast_from_bytearray/qstring_no_cast_from_bytearray.pro (renamed from tests/auto/corelib/tools/qstring_no_cast_from_bytearray/qstring_no_cast_from_bytearray.pro)0
-rw-r--r--tests/auto/corelib/text/qstring_no_cast_from_bytearray/tst_qstring_no_cast_from_bytearray.cpp (renamed from tests/auto/corelib/tools/qstring_no_cast_from_bytearray/tst_qstring_no_cast_from_bytearray.cpp)0
-rw-r--r--tests/auto/corelib/text/qstringapisymmetry/.gitignore (renamed from tests/auto/corelib/tools/qstringapisymmetry/.gitignore)0
-rw-r--r--tests/auto/corelib/text/qstringapisymmetry/qstringapisymmetry.pro (renamed from tests/auto/corelib/tools/qstringapisymmetry/qstringapisymmetry.pro)0
-rw-r--r--tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp (renamed from tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp)0
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder.pro (renamed from tests/auto/corelib/tools/qstringbuilder/qstringbuilder.pro)0
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder1/qstringbuilder1.pro (renamed from tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/qstringbuilder1.pro)0
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp (renamed from tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp)0
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp (renamed from tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp)0
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder2/qstringbuilder2.pro (renamed from tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/qstringbuilder2.pro)0
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp (renamed from tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp)0
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder3/qstringbuilder3.pro (renamed from tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/qstringbuilder3.pro)0
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp (renamed from tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp)0
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder4/qstringbuilder4.pro (renamed from tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/qstringbuilder4.pro)0
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp (renamed from tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp)0
-rw-r--r--tests/auto/corelib/text/qstringiterator/qstringiterator.pro (renamed from tests/auto/corelib/tools/qstringiterator/qstringiterator.pro)0
-rw-r--r--tests/auto/corelib/text/qstringiterator/tst_qstringiterator.cpp (renamed from tests/auto/corelib/tools/qstringiterator/tst_qstringiterator.cpp)0
-rw-r--r--tests/auto/corelib/text/qstringlist/.gitignore (renamed from tests/auto/corelib/tools/qstringlist/.gitignore)0
-rw-r--r--tests/auto/corelib/text/qstringlist/qstringlist.pro (renamed from tests/auto/corelib/tools/qstringlist/qstringlist.pro)0
-rw-r--r--tests/auto/corelib/text/qstringlist/tst_qstringlist.cpp (renamed from tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp)0
-rw-r--r--tests/auto/corelib/text/qstringmatcher/.gitignore (renamed from tests/auto/corelib/tools/qstringmatcher/.gitignore)0
-rw-r--r--tests/auto/corelib/text/qstringmatcher/qstringmatcher.pro (renamed from tests/auto/corelib/tools/qstringmatcher/qstringmatcher.pro)0
-rw-r--r--tests/auto/corelib/text/qstringmatcher/tst_qstringmatcher.cpp (renamed from tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp)0
-rw-r--r--tests/auto/corelib/text/qstringref/qstringref.pro (renamed from tests/auto/corelib/tools/qstringref/qstringref.pro)0
-rw-r--r--tests/auto/corelib/text/qstringref/tst_qstringref.cpp (renamed from tests/auto/corelib/tools/qstringref/tst_qstringref.cpp)0
-rw-r--r--tests/auto/corelib/text/qstringview/.gitignore (renamed from tests/auto/corelib/tools/qstringview/.gitignore)0
-rw-r--r--tests/auto/corelib/text/qstringview/qstringview.pro (renamed from tests/auto/corelib/tools/qstringview/qstringview.pro)0
-rw-r--r--tests/auto/corelib/text/qstringview/tst_qstringview.cpp (renamed from tests/auto/corelib/tools/qstringview/tst_qstringview.cpp)12
-rw-r--r--tests/auto/corelib/text/qtextboundaryfinder/.gitignore (renamed from tests/auto/corelib/tools/qtextboundaryfinder/.gitignore)0
-rw-r--r--tests/auto/corelib/text/qtextboundaryfinder/data/GraphemeBreakTest.txt (renamed from tests/auto/corelib/tools/qtextboundaryfinder/data/GraphemeBreakTest.txt)0
-rw-r--r--tests/auto/corelib/text/qtextboundaryfinder/data/LineBreakTest.txt (renamed from tests/auto/corelib/tools/qtextboundaryfinder/data/LineBreakTest.txt)0
-rw-r--r--tests/auto/corelib/text/qtextboundaryfinder/data/SentenceBreakTest.txt (renamed from tests/auto/corelib/tools/qtextboundaryfinder/data/SentenceBreakTest.txt)0
-rw-r--r--tests/auto/corelib/text/qtextboundaryfinder/data/WordBreakTest.txt (renamed from tests/auto/corelib/tools/qtextboundaryfinder/data/WordBreakTest.txt)0
-rw-r--r--tests/auto/corelib/text/qtextboundaryfinder/qtextboundaryfinder.pro (renamed from tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro)0
-rw-r--r--tests/auto/corelib/text/qtextboundaryfinder/testdata.qrc (renamed from tests/auto/corelib/tools/qtextboundaryfinder/testdata.qrc)0
-rw-r--r--tests/auto/corelib/text/qtextboundaryfinder/tst_qtextboundaryfinder.cpp (renamed from tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp)0
-rw-r--r--tests/auto/corelib/text/text.pro23
-rw-r--r--tests/auto/corelib/thread/qsemaphore/BLACKLIST3
-rw-r--r--tests/auto/corelib/thread/qthread/BLACKLIST7
-rw-r--r--tests/auto/corelib/thread/qthreadpool/BLACKLIST8
-rw-r--r--tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp4
-rw-r--r--tests/auto/corelib/thread/qwaitcondition/BLACKLIST2
-rw-r--r--tests/auto/corelib/time/qdatetime/BLACKLIST2
-rw-r--r--tests/auto/corelib/tools/collections/BLACKLIST2
-rw-r--r--tests/auto/corelib/tools/collections/collections.pro1
-rw-r--r--tests/auto/corelib/tools/containerapisymmetry/containerapisymmetry.pro1
-rw-r--r--tests/auto/corelib/tools/qline/tst_qline.cpp5
-rw-r--r--tests/auto/corelib/tools/qlinkedlist/qlinkedlist.pro1
-rw-r--r--tests/auto/corelib/tools/qlocale/BLACKLIST2
-rw-r--r--tests/auto/corelib/tools/qtimeline/BLACKLIST6
-rw-r--r--tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp37
-rw-r--r--tests/auto/corelib/tools/qvector/tst_qvector.cpp11
-rw-r--r--tests/auto/corelib/tools/tools.pro20
128 files changed, 428 insertions, 140 deletions
diff --git a/tests/auto/corelib/animation/qparallelanimationgroup/BLACKLIST b/tests/auto/corelib/animation/qparallelanimationgroup/BLACKLIST
index b5b37b4498..3e42a737df 100644
--- a/tests/auto/corelib/animation/qparallelanimationgroup/BLACKLIST
+++ b/tests/auto/corelib/animation/qparallelanimationgroup/BLACKLIST
@@ -1,3 +1,2 @@
[deleteChildrenWithRunningGroup]
-osx-10.12
osx-10.13
diff --git a/tests/auto/corelib/animation/qpauseanimation/BLACKLIST b/tests/auto/corelib/animation/qpauseanimation/BLACKLIST
index e223ec82e2..53372ce9ae 100644
--- a/tests/auto/corelib/animation/qpauseanimation/BLACKLIST
+++ b/tests/auto/corelib/animation/qpauseanimation/BLACKLIST
@@ -1,6 +1,9 @@
[pauseAndPropertyAnimations]
-*
+osx-10.12
+osx-10.14
+osx-10.13
[multipleSequentialGroups]
-osx
-[noTimerUpdates]
-osx
+osx-10.12
+osx-10.14
+osx-10.13
+
diff --git a/tests/auto/corelib/animation/qpropertyanimation/BLACKLIST b/tests/auto/corelib/animation/qpropertyanimation/BLACKLIST
deleted file mode 100644
index a8719b241a..0000000000
--- a/tests/auto/corelib/animation/qpropertyanimation/BLACKLIST
+++ /dev/null
@@ -1,6 +0,0 @@
-[statesAndSignals:normal animation]
-windows
-[startBackwardWithoutEndValue]
-windows
-[startWithoutStartValue]
-osx
diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST b/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST
index 4c999ff88f..e516c0e826 100644
--- a/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST
+++ b/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST
@@ -1,8 +1,6 @@
-[startGroupWithRunningChild]
-windows
[finishWithUncontrolledAnimation]
-windows
-osx-10.12
+windows-10 msvc-2015
osx-10.13
[groupWithZeroDurationAnimations]
-osx
+osx-10.13
+
diff --git a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
index 6cadebfd7f..78b6449a69 100644
--- a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
+++ b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
@@ -263,7 +263,7 @@ void tst_QTextCodec::fromUnicode()
If the encoding is a superset of ASCII, test that the byte
array is correct (no off by one, no trailing '\0').
*/
- QByteArray result = codec->fromUnicode(QStringViewLiteral("abc"));
+ QByteArray result = codec->fromUnicode(u"abc");
if (result.startsWith('a')) {
QCOMPARE(result.size(), 3);
QCOMPARE(result, QByteArray("abc"));
diff --git a/tests/auto/corelib/corelib.pro b/tests/auto/corelib/corelib.pro
index 1d76e1549b..d696e174aa 100644
--- a/tests/auto/corelib/corelib.pro
+++ b/tests/auto/corelib/corelib.pro
@@ -13,6 +13,7 @@ SUBDIRS = \
plugin \
serialization \
statemachine \
+ text \
thread \
time \
tools
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
index 7dd2a46807..17d0f86728 100644
--- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
+++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp
@@ -50,8 +50,8 @@ private slots:
void installMessageHandler();
#if QT_DEPRECATED_SINCE(5, 0)
void installMsgHandler();
-#endif
void installBothHandler();
+#endif
#ifdef QT_BUILD_INTERNAL
void cleanupFuncinfo_data();
@@ -163,7 +163,6 @@ void tst_qmessagehandler::installMsgHandler()
QtMsgHandler myHandler = qInstallMsgHandler(oldHandler);
QCOMPARE((void*)myHandler, (void*)customMsgHandler);
}
-#endif
void tst_qmessagehandler::installBothHandler()
{
@@ -178,6 +177,7 @@ void tst_qmessagehandler::installBothHandler()
QCOMPARE(s_function, Q_FUNC_INFO);
QCOMPARE(s_line, line);
}
+#endif
# define ADD(x) QTest::newRow(x) << Q_FUNC_INFO << x;
diff --git a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
index a818c6c09d..584e66a7db 100644
--- a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
+++ b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp
@@ -506,7 +506,7 @@ void tst_QDebug::qDebugQStringView() const
{
QLatin1String file, function;
int line = 0;
- const QStringView inView = QStringViewLiteral("input");
+ const QStringView inView = u"input";
MessageHandlerSetter mhs(myMessageHandler);
{ qDebug() << inView; }
diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp
index 2aebc67dcf..52e7ebadb1 100644
--- a/tests/auto/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp
@@ -1268,6 +1268,7 @@ tst_QDir::cleanPath_data()
QTest::newRow("drive-above-root") << "A:/.." << "A:/..";
QTest::newRow("unc-server-up") << "//server/path/.." << "//server";
QTest::newRow("unc-server-above-root") << "//server/.." << "//server/..";
+ QTest::newRow("longpath") << "\\\\?\\d:\\" << "d:/";
#else
QTest::newRow("data15") << "//c:/foo" << "/c:/foo";
#endif // non-windows
@@ -1745,6 +1746,7 @@ void tst_QDir::nativeSeparators()
QCOMPARE(QDir::toNativeSeparators(QLatin1String("\\")), QString("\\"));
QCOMPARE(QDir::fromNativeSeparators(QLatin1String("/")), QString("/"));
QCOMPARE(QDir::fromNativeSeparators(QLatin1String("\\")), QString("/"));
+ QCOMPARE(QDir::fromNativeSeparators(QLatin1String("\\\\?\\C:\\")), QString("C:/"));
#else
QCOMPARE(QDir::toNativeSeparators(QLatin1String("/")), QString("/"));
QCOMPARE(QDir::toNativeSeparators(QLatin1String("\\")), QString("\\"));
diff --git a/tests/auto/corelib/io/qfile/BLACKLIST b/tests/auto/corelib/io/qfile/BLACKLIST
deleted file mode 100644
index 8366667166..0000000000
--- a/tests/auto/corelib/io/qfile/BLACKLIST
+++ /dev/null
@@ -1,7 +0,0 @@
-# QTBUG-48455
-[readLineStdin]
-msvc-2015 ci
-msvc-2017 ci
-[readLineStdin_lineByLine]
-msvc-2015 ci
-msvc-2017 ci
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/BLACKLIST b/tests/auto/corelib/io/qfilesystemwatcher/BLACKLIST
index 90b714758a..9b210b0d5f 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/BLACKLIST
+++ b/tests/auto/corelib/io/qfilesystemwatcher/BLACKLIST
@@ -1,6 +1,9 @@
# QTBUG-33574 QTBUG-30943
[signalsEmittedAfterFileMoved]
-windows
+windows-10 msvc-2017
+windows-10 msvc-2019
+windows-10 msvc-2015
+windows-7sp1
[watchFileAndItsDirectory:native backend-testfile]
osx
windows
diff --git a/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp b/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp
index 569c610e24..b05c89a8bb 100644
--- a/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp
+++ b/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp
@@ -65,7 +65,7 @@ void tst_QNoDebug::noDebugOutput() const
void tst_QNoDebug::streaming() const
{
QDateTime dt(QDate(1,2,3),QTime(4,5,6));
- const QByteArray debugString = dt.toString(QStringViewLiteral("yyyy-MM-dd HH:mm:ss.zzz t")).toLatin1();
+ const QByteArray debugString = dt.toString(u"yyyy-MM-dd HH:mm:ss.zzz t").toLatin1();
const QByteArray message = "QDateTime(" + debugString + " Qt::LocalTime)";
QTest::ignoreMessage(QtWarningMsg, message.constData());
qWarning() << dt;
diff --git a/tests/auto/corelib/io/qprocess/BLACKLIST b/tests/auto/corelib/io/qprocess/BLACKLIST
index b355bb0f75..aa9fdab64d 100644
--- a/tests/auto/corelib/io/qprocess/BLACKLIST
+++ b/tests/auto/corelib/io/qprocess/BLACKLIST
@@ -2,8 +2,6 @@
redhatenterpriselinuxworkstation-6.6
# QTBUG-48455
[fileWriterProcess]
-msvc-2015 ci
-msvc-2017 ci
-[softExitInSlots]
-# QTBUG-66903
-windows
+windows-10 msvc-2015
+windows-10 msvc-2017
+
diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
index df1dbebbf2..44c8c4b681 100644
--- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
+++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Copyright (C) 2018 Intel Corporation.
+** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2019 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
@@ -563,15 +563,15 @@ void tst_QResourceEngine::setLocale()
// default constructed QResource gets the default locale
QResource resource;
resource.setFileName("aliasdir/aliasdir.txt");
- QVERIFY(!resource.isCompressed());
+ QCOMPARE(resource.compressionAlgorithm(), QResource::NoCompression);
// change the default locale and make sure it doesn't affect the resource
QLocale::setDefault(QLocale("de_CH"));
- QVERIFY(!resource.isCompressed());
+ QCOMPARE(resource.compressionAlgorithm(), QResource::NoCompression);
// then explicitly set the locale on qresource
resource.setLocale(QLocale("de_CH"));
- QVERIFY(resource.isCompressed());
+ QVERIFY(resource.compressionAlgorithm() != QResource::NoCompression);
// the reset the default locale back
QLocale::setDefault(QLocale::system());
diff --git a/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp b/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp
index 96970421d3..f1327933c4 100644
--- a/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp
+++ b/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp
@@ -72,6 +72,7 @@ public slots:
private slots:
void transactionalWrite();
+ void retryTransactionalWrite();
void textStreamManualFlush();
void textStreamAutoFlush();
void saveTwice();
@@ -129,6 +130,39 @@ void tst_QSaveFile::transactionalWrite()
QCOMPARE(QFile::permissions(targetFile), QFile::permissions(otherFile));
}
+// QTBUG-77007: Simulate the case of an application with a loop prompting
+// to retry saving on failure. Create a read-only file first (Unix only)
+void tst_QSaveFile::retryTransactionalWrite()
+{
+#ifndef Q_OS_UNIX
+ QSKIP("This test is Unix only");
+#endif
+ QTemporaryDir dir;
+ QVERIFY2(dir.isValid(), qPrintable(dir.errorString()));
+
+ QString targetFile = dir.path() + QLatin1String("/outfile");
+ const QString readOnlyName = targetFile + QLatin1String(".ro");
+ {
+ QFile readOnlyFile(readOnlyName);
+ QVERIFY2(readOnlyFile.open(QIODevice::WriteOnly), msgCannotOpen(readOnlyFile).constData());
+ readOnlyFile.write("Hello");
+ readOnlyFile.close();
+ auto permissions = readOnlyFile.permissions();
+ permissions &= ~(QFileDevice::WriteOwner | QFileDevice::WriteGroup | QFileDevice::WriteUser);
+ QVERIFY(readOnlyFile.setPermissions(permissions));
+ }
+
+ QSaveFile file(readOnlyName);
+ QVERIFY(!file.open(QIODevice::WriteOnly));
+
+ file.setFileName(targetFile);
+ QVERIFY2(file.open(QIODevice::WriteOnly), msgCannotOpen(file).constData());
+ QVERIFY(file.isOpen());
+ QCOMPARE(file.write("Hello"), Q_INT64_C(5));
+ QCOMPARE(file.error(), QFile::NoError);
+ QVERIFY(file.commit());
+}
+
void tst_QSaveFile::saveTwice()
{
// Check that we can reuse a QSaveFile object
diff --git a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
index a71a68e457..289590a233 100644
--- a/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
+++ b/tests/auto/corelib/io/qsettings/tst_qsettings.cpp
@@ -1366,7 +1366,9 @@ void tst_QSettings::testVariantTypes()
if (format >= QSettings::InvalidFormat) {
testVal("keysequence", QKeySequence(Qt::ControlModifier + Qt::Key_F1), QKeySequence, KeySequence);
} else {
- testVal("keysequence", QKeySequence(Qt::ControlModifier + Qt::Key_F1), QString, String);
+ testVal("keysequence",
+ QKeySequence(Qt::ControlModifier + Qt::Key_F1).toString(QKeySequence::NativeText),
+ QString, String);
}
#undef testVal
diff --git a/tests/auto/corelib/kernel/qelapsedtimer/BLACKLIST b/tests/auto/corelib/kernel/qelapsedtimer/BLACKLIST
index 4dd71ca9f4..4c9fe53c14 100644
--- a/tests/auto/corelib/kernel/qelapsedtimer/BLACKLIST
+++ b/tests/auto/corelib/kernel/qelapsedtimer/BLACKLIST
@@ -1,4 +1,4 @@
[elapsed]
-windows
-osx-10.12
+windows-10 msvc-2015
osx-10.13
+windows-10 msvc-2017
diff --git a/tests/auto/corelib/kernel/qeventdispatcher/BLACKLIST b/tests/auto/corelib/kernel/qeventdispatcher/BLACKLIST
deleted file mode 100644
index 06588188d4..0000000000
--- a/tests/auto/corelib/kernel/qeventdispatcher/BLACKLIST
+++ /dev/null
@@ -1,6 +0,0 @@
-[sendPostedEvents]
-windows
-[registerTimer]
-windows
-winrt
-osx
diff --git a/tests/auto/corelib/kernel/qeventloop/BLACKLIST b/tests/auto/corelib/kernel/qeventloop/BLACKLIST
deleted file mode 100644
index 6ea6314b0a..0000000000
--- a/tests/auto/corelib/kernel/qeventloop/BLACKLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-[testQuitLock]
-windows
diff --git a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
index 56623773a2..9fe7d63727 100644
--- a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
+++ b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp
@@ -1322,8 +1322,8 @@ bool tst_QMetaObjectBuilder::sameMetaObject
return false;
}
- const QMetaObject * const *objects1 = meta1->d.relatedMetaObjects;
- const QMetaObject * const *objects2 = meta2->d.relatedMetaObjects;
+ const auto *objects1 = meta1->d.relatedMetaObjects;
+ const auto *objects2 = meta2->d.relatedMetaObjects;
if (objects1 && !objects2)
return false;
if (objects2 && !objects1)
@@ -1391,7 +1391,7 @@ private:
};
QMetaObject TestObject::staticMetaObject = {
- { 0, 0, 0, 0, 0, 0 }
+ { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }
};
TestObject::TestObject(QObject *parent)
diff --git a/tests/auto/corelib/kernel/qmetatype/qmetatype.pro b/tests/auto/corelib/kernel/qmetatype/qmetatype.pro
index 56b8c071c3..4856b138c3 100644
--- a/tests/auto/corelib/kernel/qmetatype/qmetatype.pro
+++ b/tests/auto/corelib/kernel/qmetatype/qmetatype.pro
@@ -5,6 +5,7 @@ INCLUDEPATH += $$PWD/../../../other/qvariant_common
SOURCES = tst_qmetatype.cpp
TESTDATA=./typeFlags.bin
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+DEFINES -= QT_NO_LINKED_LIST
msvc|winrt {
# Prevents "fatal error C1128: number of sections exceeded object file format limit".
diff --git a/tests/auto/corelib/kernel/qobject/BLACKLIST b/tests/auto/corelib/kernel/qobject/BLACKLIST
deleted file mode 100644
index 0887a73b4c..0000000000
--- a/tests/auto/corelib/kernel/qobject/BLACKLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-[moveToThread]
-windows
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
index 1778bf24bc..a805bfb747 100644
--- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
+++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp
@@ -1401,6 +1401,7 @@ struct CustomType
CustomType(const CustomType &other): i1(other.i1), i2(other.i2), i3(other.i3)
{ ++instanceCount; playWithObjects(); }
~CustomType() { --instanceCount; playWithObjects(); }
+ CustomType &operator=(const CustomType &) = default;
int i1, i2, i3;
int value() { return i1 + i2 + i3; }
diff --git a/tests/auto/corelib/kernel/qsocketnotifier/BLACKLIST b/tests/auto/corelib/kernel/qsocketnotifier/BLACKLIST
index e68bf84268..f3b7fc97b1 100644
--- a/tests/auto/corelib/kernel/qsocketnotifier/BLACKLIST
+++ b/tests/auto/corelib/kernel/qsocketnotifier/BLACKLIST
@@ -1,3 +1,4 @@
[unexpectedDisconnection]
-windows
-osx
+osx-10.12
+windows-10 msvc-2015
+windows-7sp1
diff --git a/tests/auto/corelib/kernel/qtimer/BLACKLIST b/tests/auto/corelib/kernel/qtimer/BLACKLIST
index 16cbab4587..dc8b8987e5 100644
--- a/tests/auto/corelib/kernel/qtimer/BLACKLIST
+++ b/tests/auto/corelib/kernel/qtimer/BLACKLIST
@@ -1,5 +1,9 @@
[remainingTime]
-windows
-osx
+osx-10.12
+osx-10.14
+osx-10.13
+windows-10 msvc-2017
[basic_chrono]
-osx
+osx-10.14
+osx-10.13
+
diff --git a/tests/auto/corelib/kernel/qvariant/qvariant.pro b/tests/auto/corelib/kernel/qvariant/qvariant.pro
index a620be0091..0b5280df86 100644
--- a/tests/auto/corelib/kernel/qvariant/qvariant.pro
+++ b/tests/auto/corelib/kernel/qvariant/qvariant.pro
@@ -5,6 +5,7 @@ INCLUDEPATH += $$PWD/../../../other/qvariant_common
SOURCES = tst_qvariant.cpp
RESOURCES += qvariant.qrc
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
+DEFINES -= QT_NO_LINKED_LIST
qtConfig(c++14): CONFIG += c++14
qtConfig(c++1z): CONFIG += c++1z
!qtConfig(doubleconversion):!qtConfig(system-doubleconversion) {
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
index 5d06f6e8c8..074cb07092 100644
--- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -379,11 +379,13 @@ void tst_QVariant::isNull()
QString str1;
QVariant var1( str1 );
QVERIFY( var1.isNull() );
+#if QT_DEPRECATED_SINCE(5, 9)
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
QVariant var2( QString::null );
QT_WARNING_POP
QVERIFY( var2.isNull() );
+#endif
QVariant var3( QString( "blah" ) );
QVERIFY( !var3.isNull() );
diff --git a/tests/auto/corelib/serialization/json/tst_qtjson.cpp b/tests/auto/corelib/serialization/json/tst_qtjson.cpp
index 1cbe0cae48..57aa67c142 100644
--- a/tests/auto/corelib/serialization/json/tst_qtjson.cpp
+++ b/tests/auto/corelib/serialization/json/tst_qtjson.cpp
@@ -436,6 +436,8 @@ void tst_QtJson::testObjectSimple()
object.insert("boolean", true);
QCOMPARE(object.value("boolean").toBool(), true);
QCOMPARE(object.value(QLatin1String("boolean")).toBool(), true);
+ QJsonObject object2 = object;
+ QJsonObject object3 = object;
QStringList keys = object.keys();
QVERIFY2(keys.contains("number"), "key number not found");
@@ -461,6 +463,40 @@ void tst_QtJson::testObjectSimple()
object.insert("string", QString::fromLatin1("foo"));
QVERIFY2(object.value(QLatin1String("string")).toString() != before, "value should have been updated");
+ // same tests again but with QStringView keys
+ object2.insert(QStringView(u"value"), value);
+ QCOMPARE(object2.value("value"), value);
+
+ size = object2.size();
+ object2.remove(QStringView(u"boolean"));
+ QCOMPARE(object2.size(), size - 1);
+ QVERIFY2(!object2.contains(QStringView(u"boolean")), "key boolean should have been removed");
+
+ taken = object2.take(QStringView(u"value"));
+ QCOMPARE(taken, value);
+ QVERIFY2(!object2.contains("value"), "key value should have been removed");
+
+ before = object2.value("string").toString();
+ object2.insert(QStringView(u"string"), QString::fromLatin1("foo"));
+ QVERIFY2(object2.value(QStringView(u"string")).toString() != before, "value should have been updated");
+
+ // same tests again but with QLatin1String keys
+ object3.insert(QLatin1String("value"), value);
+ QCOMPARE(object3.value("value"), value);
+
+ size = object3.size();
+ object3.remove(QLatin1String("boolean"));
+ QCOMPARE(object3.size(), size - 1);
+ QVERIFY2(!object3.contains("boolean"), "key boolean should have been removed");
+
+ taken = object3.take(QLatin1String("value"));
+ QCOMPARE(taken, value);
+ QVERIFY2(!object3.contains("value"), "key value should have been removed");
+
+ before = object3.value("string").toString();
+ object3.insert(QLatin1String("string"), QString::fromLatin1("foo"));
+ QVERIFY2(object3.value(QLatin1String("string")).toString() != before, "value should have been updated");
+
size = object.size();
QJsonObject subobject;
subobject.insert("number", 42);
@@ -1096,6 +1132,8 @@ void tst_QtJson::undefinedValues()
QJsonObject object;
object.insert("Key", QJsonValue(QJsonValue::Undefined));
QCOMPARE(object.size(), 0);
+ object["Key"] = QJsonValue(QJsonValue::Undefined);
+ QCOMPARE(object.size(), 0);
object.insert("Key", QLatin1String("Value"));
QCOMPARE(object.size(), 1);
@@ -2698,6 +2736,8 @@ void tst_QtJson::longStrings()
// test around 15 and 16 bit boundaries, as these are limits
// in the data structures (for Latin1String in qjson_p.h)
QString s(0x7ff0, 'a');
+ QByteArray ba(0x7ff0, 'a');
+ ba.append(0x8010 - 0x7ff0, 'c');
for (int i = 0x7ff0; i < 0x8010; i++) {
s.append(QLatin1Char('c'));
@@ -2714,9 +2754,21 @@ void tst_QtJson::longStrings()
/* ... and a QByteArray from the QJsonDocument */
QByteArray a2 = d2.toJson();
QCOMPARE(a1, a2);
+
+ // Test long keys
+ QJsonObject o1, o2;
+ o1[s] = 42;
+ o2[QLatin1String(ba.data(), i + 1)] = 42;
+ d1.setObject(o1);
+ d2.setObject(o2);
+ a1 = d1.toJson();
+ a2 = d2.toJson();
+ QCOMPARE(a1, a2);
}
s = QString(0xfff0, 'a');
+ ba = QByteArray(0xfff0, 'a');
+ ba.append(0x10010 - 0xfff0, 'c');
for (int i = 0xfff0; i < 0x10010; i++) {
s.append(QLatin1Char('c'));
@@ -2733,6 +2785,16 @@ void tst_QtJson::longStrings()
/* ... and a QByteArray from the QJsonDocument */
QByteArray a2 = d2.toJson();
QCOMPARE(a1, a2);
+
+ // Test long keys
+ QJsonObject o1, o2;
+ o1[s] = 42;
+ o2[QLatin1String(ba.data(), i + 1)] = 42;
+ d1.setObject(o1);
+ d2.setObject(o2);
+ a1 = d1.toJson();
+ a2 = d2.toJson();
+ QCOMPARE(a1, a2);
}
}
diff --git a/tests/auto/corelib/serialization/qcborstreamreader/tst_qcborstreamreader.cpp b/tests/auto/corelib/serialization/qcborstreamreader/tst_qcborstreamreader.cpp
index 3dd4b5114c..28d29168fb 100644
--- a/tests/auto/corelib/serialization/qcborstreamreader/tst_qcborstreamreader.cpp
+++ b/tests/auto/corelib/serialization/qcborstreamreader/tst_qcborstreamreader.cpp
@@ -80,6 +80,11 @@ private Q_SLOTS:
void addData_singleElement();
void addData_complex_data() { arrays_data(); }
void addData_complex();
+
+ void duplicatedData_data() { arrays_data(); }
+ void duplicatedData();
+ void extraData_data() { arrays_data(); }
+ void extraData();
};
#define FOR_CBOR_TYPE(F) \
@@ -480,6 +485,28 @@ static QString parseOne(QCborStreamReader &reader)
return result;
}
+static QString parse(QCborStreamReader &reader, const QByteArray &data)
+{
+ qint64 oldPos = 0;
+ if (QIODevice *dev = reader.device())
+ oldPos = dev->pos();
+
+ QString r = parseOne(reader);
+ if (r.isEmpty())
+ return r;
+
+ if (reader.currentOffset() - oldPos != data.size())
+ r = QString("Number of parsed bytes (%1) not expected (%2)")
+ .arg(reader.currentOffset()).arg(data.size());
+ if (QIODevice *dev = reader.device()) {
+ if (dev->pos() - oldPos != data.size())
+ r = QString("QIODevice not advanced (%1) as expected (%2)")
+ .arg(dev->pos()).arg(data.size());
+ }
+
+ return r;
+}
+
bool parseNonRecursive(QString &result, bool &printingStringChunks, QCborStreamReader &reader)
{
while (reader.lastError() == QCborError::NoError) {
@@ -612,13 +639,13 @@ void tst_QCborStreamReader::fixed()
}
QVERIFY(reader.isValid());
QCOMPARE(reader.lastError(), QCborError::NoError);
- QCOMPARE(parseOne(reader), expected);
+ QCOMPARE(parse(reader, data), expected);
// verify that we can re-read
reader.reset();
QVERIFY(reader.isValid());
QCOMPARE(reader.lastError(), QCborError::NoError);
- QCOMPARE(parseOne(reader), expected);
+ QCOMPARE(parse(reader, data), expected);
}
void tst_QCborStreamReader::strings_data()
@@ -721,7 +748,7 @@ void tst_QCborStreamReader::emptyContainers()
QCOMPARE(reader.lastError(), QCborError::NoError);
if (reader.isLengthKnown())
QCOMPARE(reader.length(), 0U);
- QCOMPARE(parseOne(reader), expected);
+ QCOMPARE(parse(reader, data), expected);
// verify that we can re-read
reader.reset();
@@ -729,7 +756,7 @@ void tst_QCborStreamReader::emptyContainers()
QCOMPARE(reader.lastError(), QCborError::NoError);
if (reader.isLengthKnown())
QCOMPARE(reader.length(), 0U);
- QCOMPARE(parseOne(reader), expected);
+ QCOMPARE(parse(reader, data), expected);
}
void tst_QCborStreamReader::arrays_data()
@@ -758,7 +785,7 @@ static void checkContainer(int len, const QByteArray &data, const QString &expec
QVERIFY(reader.isLengthKnown());
QCOMPARE(reader.length(), uint(len));
}
- QCOMPARE(parseOne(reader), expected);
+ QCOMPARE(parse(reader, data), expected);
// verify that we can re-read
reader.reset();
@@ -768,7 +795,7 @@ static void checkContainer(int len, const QByteArray &data, const QString &expec
QVERIFY(reader.isLengthKnown());
QCOMPARE(reader.length(), uint(len));
}
- QCOMPARE(parseOne(reader), expected);
+ QCOMPARE(parse(reader, data), expected);
}
void tst_QCborStreamReader::arrays()
@@ -892,7 +919,7 @@ void tst_QCborStreamReader::validation()
buffer.open(QIODevice::ReadOnly);
reader.setDevice(&buffer);
}
- parseOne(reader);
+ parse(reader, data);
QVERIFY(reader.lastError() != QCborError::NoError);
// next() should fail
@@ -997,7 +1024,7 @@ void tst_QCborStreamReader::addData_singleElement()
reader.addData(data.constData() + i, 1);
}
- parseOne(reader);
+ parse(reader, data);
QCOMPARE(reader.lastError(), QCborError::EndOfFile);
}
@@ -1009,7 +1036,7 @@ void tst_QCborStreamReader::addData_singleElement()
reader.addData(data.right(1));
}
QCOMPARE(reader.lastError(), QCborError::NoError);
- QCOMPARE(parseOne(reader), expected);
+ QCOMPARE(parse(reader, data), expected);
}
void tst_QCborStreamReader::addData_complex()
@@ -1085,6 +1112,69 @@ void tst_QCborStreamReader::addData_complex()
"{1, [" + expected + ", " + expected + "]}");
}
+void tst_QCborStreamReader::duplicatedData()
+{
+ QFETCH_GLOBAL(bool, useDevice);
+ QFETCH(QByteArray, data);
+ QFETCH(QString, expected);
+ removeIndicators(expected);
+
+ // double the data up
+ QByteArray doubledata = data + data;
+
+ QBuffer buffer(&doubledata);
+ QCborStreamReader reader(doubledata);
+ if (useDevice) {
+ buffer.open(QIODevice::ReadOnly);
+ reader.setDevice(&buffer);
+ }
+ QVERIFY(reader.isValid());
+ QCOMPARE(reader.lastError(), QCborError::NoError);
+ QCOMPARE(parse(reader, data), expected); // yes, data
+
+ QVERIFY(reader.currentOffset() < doubledata.size());
+ if (useDevice) {
+ reader.setDevice(&buffer);
+ QVERIFY(reader.isValid());
+ QCOMPARE(reader.lastError(), QCborError::NoError);
+ QCOMPARE(parse(reader, data), expected);
+ QCOMPARE(buffer.pos(), doubledata.size());
+ } else {
+ // there's no reader.setData()
+ }
+}
+
+void tst_QCborStreamReader::extraData()
+{
+ QFETCH_GLOBAL(bool, useDevice);
+ QFETCH(QByteArray, data);
+ QFETCH(QString, expected);
+ removeIndicators(expected);
+
+ QByteArray extension(9, '\0');
+
+ // stress test everything with extra bytes (just one byte changing;
+ // TinyCBOR used to have a bug where the next byte got sometimes read)
+ for (int c = '\0'; c < 0x100; ++c) {
+ extension[0] = c;
+ QByteArray extendeddata = data + extension;
+
+ QBuffer buffer(&extendeddata);
+ QCborStreamReader reader(extendeddata);
+ if (useDevice) {
+ buffer.open(QIODevice::ReadOnly);
+ reader.setDevice(&buffer);
+ }
+ QVERIFY(reader.isValid());
+ QCOMPARE(reader.lastError(), QCborError::NoError);
+ QCOMPARE(parse(reader, data), expected); // yes, data
+
+ // if we were a parser, we could parse the next payload
+ if (useDevice)
+ QCOMPARE(buffer.readAll(), extension);
+ }
+}
+
QTEST_MAIN(tst_QCborStreamReader)
diff --git a/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp b/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp
index f69ce4120d..6fa82ea681 100644
--- a/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp
+++ b/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp
@@ -91,8 +91,14 @@ private slots:
void toCbor_data();
void toCbor();
+ void toCborStreamWriter_data() { toCbor_data(); }
+ void toCborStreamWriter();
void fromCbor_data();
void fromCbor();
+ void fromCborStreamReaderByteArray_data() { fromCbor_data(); }
+ void fromCborStreamReaderByteArray();
+ void fromCborStreamReaderIODevice_data() { fromCbor_data(); }
+ void fromCborStreamReaderIODevice();
void validation_data();
void validation();
void toDiagnosticNotation_data();
@@ -1454,6 +1460,22 @@ void tst_QCborValue::toCbor()
"\xa1\x01\xd9\xd9\xf7" + result);
}
+void tst_QCborValue::toCborStreamWriter()
+{
+ QFETCH(QCborValue, v);
+ QFETCH(QByteArray, result);
+ QFETCH(QCborValue::EncodingOptions, options);
+
+ QByteArray output;
+ QBuffer buffer(&output);
+ buffer.open(QIODevice::WriteOnly);
+ QCborStreamWriter writer(&buffer);
+
+ v.toCbor(writer, options);
+ QCOMPARE(buffer.pos(), result.size());
+ QCOMPARE(output, result);
+}
+
void tst_QCborValue::fromCbor_data()
{
addCommonCborData();
@@ -1484,20 +1506,11 @@ void tst_QCborValue::fromCbor_data()
<< raw("\xd8\x25\x51" "\1\2\3\4""\4\3\2\0""\0\0\0\0""\0\0\0\1""\2");
}
-void tst_QCborValue::fromCbor()
+void fromCbor_common(void (*doCheck)(const QCborValue &, const QByteArray &))
{
QFETCH(QCborValue, v);
QFETCH(QByteArray, result);
- auto doCheck = [](const QCborValue &v, const QByteArray &result) {
- QCborParserError error;
- QCborValue decoded = QCborValue::fromCbor(result, &error);
- QVERIFY2(error.error == QCborError(), qPrintable(error.errorString()));
- QCOMPARE(error.offset, result.size());
- QVERIFY(decoded == v);
- QVERIFY(v == decoded);
- };
-
doCheck(v, result);
if (QTest::currentTestFailed())
return;
@@ -1548,6 +1561,52 @@ void tst_QCborValue::fromCbor()
return;
}
+void tst_QCborValue::fromCbor()
+{
+ auto doCheck = [](const QCborValue &v, const QByteArray &result) {
+ QCborParserError error;
+ QCborValue decoded = QCborValue::fromCbor(result, &error);
+ QVERIFY2(error.error == QCborError(), qPrintable(error.errorString()));
+ QCOMPARE(error.offset, result.size());
+ QVERIFY(decoded == v);
+ QVERIFY(v == decoded);
+ };
+
+ fromCbor_common(doCheck);
+}
+
+void tst_QCborValue::fromCborStreamReaderByteArray()
+{
+ auto doCheck = [](const QCborValue &expected, const QByteArray &data) {
+ QCborStreamReader reader(data);
+ QCborValue decoded = QCborValue::fromCbor(reader);
+ QCOMPARE(reader.lastError(), QCborError());
+ QCOMPARE(reader.currentOffset(), data.size());
+ QVERIFY(decoded == expected);
+ QVERIFY(expected == decoded);
+ };
+
+ fromCbor_common(doCheck);
+}
+
+void tst_QCborValue::fromCborStreamReaderIODevice()
+{
+ auto doCheck = [](const QCborValue &expected, const QByteArray &data) {
+ QBuffer buffer;
+ buffer.setData(data);
+ buffer.open(QIODevice::ReadOnly);
+ QCborStreamReader reader(&buffer);
+ QCborValue decoded = QCborValue::fromCbor(reader);
+ QCOMPARE(reader.lastError(), QCborError());
+ QCOMPARE(reader.currentOffset(), data.size());
+ QVERIFY(decoded == expected);
+ QVERIFY(expected == decoded);
+ QCOMPARE(buffer.pos(), reader.currentOffset());
+ };
+
+ fromCbor_common(doCheck);
+}
+
void tst_QCborValue::validation_data()
{
addValidationColumns();
diff --git a/tests/auto/corelib/serialization/qdatastream/qdatastream.pro b/tests/auto/corelib/serialization/qdatastream/qdatastream.pro
index 25f8b889a0..469d689f3f 100644
--- a/tests/auto/corelib/serialization/qdatastream/qdatastream.pro
+++ b/tests/auto/corelib/serialization/qdatastream/qdatastream.pro
@@ -3,6 +3,8 @@ TARGET = tst_qdatastream
QT += testlib
SOURCES = tst_qdatastream.cpp
+DEFINES -= QT_NO_LINKED_LIST
+
TESTDATA += datastream.q42
android:!android-embedded {
diff --git a/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp
index b8778e4e98..8197c386c5 100644
--- a/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp
+++ b/tests/auto/corelib/serialization/qdatastream/tst_qdatastream.cpp
@@ -2391,10 +2391,10 @@ void tst_QDataStream::setVersion()
if (vers == 1) {
for (int grp = 0; grp < (int)QPalette::NColorGroups; ++grp) {
- QVERIFY(pal1.color((QPalette::ColorGroup)grp, QPalette::Foreground)
- == inPal1.color((QPalette::ColorGroup)grp, QPalette::Foreground));
- QVERIFY(pal1.color((QPalette::ColorGroup)grp, QPalette::Background)
- == inPal1.color((QPalette::ColorGroup)grp, QPalette::Background));
+ QVERIFY(pal1.color((QPalette::ColorGroup)grp, QPalette::WindowText)
+ == inPal1.color((QPalette::ColorGroup)grp, QPalette::WindowText));
+ QVERIFY(pal1.color((QPalette::ColorGroup)grp, QPalette::Window)
+ == inPal1.color((QPalette::ColorGroup)grp, QPalette::Window));
QVERIFY(pal1.color((QPalette::ColorGroup)grp, QPalette::Light)
== inPal1.color((QPalette::ColorGroup)grp, QPalette::Light));
QVERIFY(pal1.color((QPalette::ColorGroup)grp, QPalette::Dark)
diff --git a/tests/auto/corelib/serialization/qtextstream/BLACKLIST b/tests/auto/corelib/serialization/qtextstream/BLACKLIST
index b54b53cd74..b8c1b742f4 100644
--- a/tests/auto/corelib/serialization/qtextstream/BLACKLIST
+++ b/tests/auto/corelib/serialization/qtextstream/BLACKLIST
@@ -1,3 +1,4 @@
[stillOpenWhenAtEnd]
-windows
+windows-10 msvc-2017
winrt
+windows-7sp1
diff --git a/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp
index 32306e8003..6381ce5ed0 100644
--- a/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp
+++ b/tests/auto/corelib/serialization/qtextstream/tst_qtextstream.cpp
@@ -2586,7 +2586,7 @@ void tst_QTextStream::stringview_write_operator_ToDevice()
QBuffer buf;
buf.open(QBuffer::WriteOnly);
QTextStream stream(&buf);
- const QStringView expected = QStringViewLiteral("expectedStringView");
+ const QStringView expected = u"expectedStringView";
stream << expected;
stream.flush();
QCOMPARE(buf.buffer().constData(), "expectedStringView");
diff --git a/tests/auto/corelib/tools/qbytearray/.gitattributes b/tests/auto/corelib/text/qbytearray/.gitattributes
index e04709aa2e..e04709aa2e 100644
--- a/tests/auto/corelib/tools/qbytearray/.gitattributes
+++ b/tests/auto/corelib/text/qbytearray/.gitattributes
diff --git a/tests/auto/corelib/tools/qbytearray/.gitignore b/tests/auto/corelib/text/qbytearray/.gitignore
index 3de7c3fab5..3de7c3fab5 100644
--- a/tests/auto/corelib/tools/qbytearray/.gitignore
+++ b/tests/auto/corelib/text/qbytearray/.gitignore
diff --git a/tests/auto/corelib/tools/qbytearray/android_testdata.qrc b/tests/auto/corelib/text/qbytearray/android_testdata.qrc
index 5d42f0f627..5d42f0f627 100644
--- a/tests/auto/corelib/tools/qbytearray/android_testdata.qrc
+++ b/tests/auto/corelib/text/qbytearray/android_testdata.qrc
diff --git a/tests/auto/corelib/tools/qbytearray/qbytearray.pro b/tests/auto/corelib/text/qbytearray/qbytearray.pro
index c2101b0611..c2101b0611 100644
--- a/tests/auto/corelib/tools/qbytearray/qbytearray.pro
+++ b/tests/auto/corelib/text/qbytearray/qbytearray.pro
diff --git a/tests/auto/corelib/tools/qbytearray/rfc3252.txt b/tests/auto/corelib/text/qbytearray/rfc3252.txt
index b80c61bf0a..b80c61bf0a 100644
--- a/tests/auto/corelib/tools/qbytearray/rfc3252.txt
+++ b/tests/auto/corelib/text/qbytearray/rfc3252.txt
diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp
index 90dfcaef25..90dfcaef25 100644
--- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp
diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray_mac.mm b/tests/auto/corelib/text/qbytearray/tst_qbytearray_mac.mm
index 98146e3525..98146e3525 100644
--- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray_mac.mm
+++ b/tests/auto/corelib/text/qbytearray/tst_qbytearray_mac.mm
diff --git a/tests/auto/corelib/tools/qbytearraylist/qbytearraylist.pro b/tests/auto/corelib/text/qbytearraylist/qbytearraylist.pro
index 6c05c288cf..6c05c288cf 100644
--- a/tests/auto/corelib/tools/qbytearraylist/qbytearraylist.pro
+++ b/tests/auto/corelib/text/qbytearraylist/qbytearraylist.pro
diff --git a/tests/auto/corelib/tools/qbytearraylist/tst_qbytearraylist.cpp b/tests/auto/corelib/text/qbytearraylist/tst_qbytearraylist.cpp
index 09ce41337e..09ce41337e 100644
--- a/tests/auto/corelib/tools/qbytearraylist/tst_qbytearraylist.cpp
+++ b/tests/auto/corelib/text/qbytearraylist/tst_qbytearraylist.cpp
diff --git a/tests/auto/corelib/tools/qbytearraymatcher/qbytearraymatcher.pro b/tests/auto/corelib/text/qbytearraymatcher/qbytearraymatcher.pro
index 9d4d5964c9..9d4d5964c9 100644
--- a/tests/auto/corelib/tools/qbytearraymatcher/qbytearraymatcher.pro
+++ b/tests/auto/corelib/text/qbytearraymatcher/qbytearraymatcher.pro
diff --git a/tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp b/tests/auto/corelib/text/qbytearraymatcher/tst_qbytearraymatcher.cpp
index 647a3ae379..647a3ae379 100644
--- a/tests/auto/corelib/tools/qbytearraymatcher/tst_qbytearraymatcher.cpp
+++ b/tests/auto/corelib/text/qbytearraymatcher/tst_qbytearraymatcher.cpp
diff --git a/tests/auto/corelib/tools/qbytedatabuffer/.gitignore b/tests/auto/corelib/text/qbytedatabuffer/.gitignore
index 3024a4dba2..3024a4dba2 100644
--- a/tests/auto/corelib/tools/qbytedatabuffer/.gitignore
+++ b/tests/auto/corelib/text/qbytedatabuffer/.gitignore
diff --git a/tests/auto/corelib/tools/qbytedatabuffer/qbytedatabuffer.pro b/tests/auto/corelib/text/qbytedatabuffer/qbytedatabuffer.pro
index e23018f96a..e23018f96a 100644
--- a/tests/auto/corelib/tools/qbytedatabuffer/qbytedatabuffer.pro
+++ b/tests/auto/corelib/text/qbytedatabuffer/qbytedatabuffer.pro
diff --git a/tests/auto/corelib/tools/qbytedatabuffer/tst_qbytedatabuffer.cpp b/tests/auto/corelib/text/qbytedatabuffer/tst_qbytedatabuffer.cpp
index 59f4d153e6..59f4d153e6 100644
--- a/tests/auto/corelib/tools/qbytedatabuffer/tst_qbytedatabuffer.cpp
+++ b/tests/auto/corelib/text/qbytedatabuffer/tst_qbytedatabuffer.cpp
diff --git a/tests/auto/corelib/tools/qchar/.gitignore b/tests/auto/corelib/text/qchar/.gitignore
index 341b3e6c3f..341b3e6c3f 100644
--- a/tests/auto/corelib/tools/qchar/.gitignore
+++ b/tests/auto/corelib/text/qchar/.gitignore
diff --git a/tests/auto/corelib/tools/qchar/data/NormalizationTest.txt b/tests/auto/corelib/text/qchar/data/NormalizationTest.txt
index 0290080998..0290080998 100644
--- a/tests/auto/corelib/tools/qchar/data/NormalizationTest.txt
+++ b/tests/auto/corelib/text/qchar/data/NormalizationTest.txt
diff --git a/tests/auto/corelib/tools/qchar/qchar.pro b/tests/auto/corelib/text/qchar/qchar.pro
index 70c1222988..70c1222988 100644
--- a/tests/auto/corelib/tools/qchar/qchar.pro
+++ b/tests/auto/corelib/text/qchar/qchar.pro
diff --git a/tests/auto/corelib/tools/qchar/testdata.qrc b/tests/auto/corelib/text/qchar/testdata.qrc
index 7b3fb2461c..7b3fb2461c 100644
--- a/tests/auto/corelib/tools/qchar/testdata.qrc
+++ b/tests/auto/corelib/text/qchar/testdata.qrc
diff --git a/tests/auto/corelib/tools/qchar/tst_qchar.cpp b/tests/auto/corelib/text/qchar/tst_qchar.cpp
index cf4f6d21e2..cf4f6d21e2 100644
--- a/tests/auto/corelib/tools/qchar/tst_qchar.cpp
+++ b/tests/auto/corelib/text/qchar/tst_qchar.cpp
diff --git a/tests/auto/corelib/tools/qcollator/qcollator.pro b/tests/auto/corelib/text/qcollator/qcollator.pro
index 2f3995a75f..2f3995a75f 100644
--- a/tests/auto/corelib/tools/qcollator/qcollator.pro
+++ b/tests/auto/corelib/text/qcollator/qcollator.pro
diff --git a/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp b/tests/auto/corelib/text/qcollator/tst_qcollator.cpp
index 2ae9c6e159..2ae9c6e159 100644
--- a/tests/auto/corelib/tools/qcollator/tst_qcollator.cpp
+++ b/tests/auto/corelib/text/qcollator/tst_qcollator.cpp
diff --git a/tests/auto/corelib/tools/qlatin1string/.gitignore b/tests/auto/corelib/text/qlatin1string/.gitignore
index dddf56b2df..dddf56b2df 100644
--- a/tests/auto/corelib/tools/qlatin1string/.gitignore
+++ b/tests/auto/corelib/text/qlatin1string/.gitignore
diff --git a/tests/auto/corelib/tools/qlatin1string/qlatin1string.pro b/tests/auto/corelib/text/qlatin1string/qlatin1string.pro
index 61054b40e4..61054b40e4 100644
--- a/tests/auto/corelib/tools/qlatin1string/qlatin1string.pro
+++ b/tests/auto/corelib/text/qlatin1string/qlatin1string.pro
diff --git a/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp b/tests/auto/corelib/text/qlatin1string/tst_qlatin1string.cpp
index cf46159251..cf46159251 100644
--- a/tests/auto/corelib/tools/qlatin1string/tst_qlatin1string.cpp
+++ b/tests/auto/corelib/text/qlatin1string/tst_qlatin1string.cpp
diff --git a/tests/auto/corelib/tools/qlocale/.gitignore b/tests/auto/corelib/text/qlocale/.gitignore
index 21ab80a2af..21ab80a2af 100644
--- a/tests/auto/corelib/tools/qlocale/.gitignore
+++ b/tests/auto/corelib/text/qlocale/.gitignore
diff --git a/tests/auto/corelib/tools/qlocale/qlocale.pro b/tests/auto/corelib/text/qlocale/qlocale.pro
index 5161200260..5161200260 100644
--- a/tests/auto/corelib/tools/qlocale/qlocale.pro
+++ b/tests/auto/corelib/text/qlocale/qlocale.pro
diff --git a/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.cpp b/tests/auto/corelib/text/qlocale/syslocaleapp/syslocaleapp.cpp
index 1e1bcc8c5f..1e1bcc8c5f 100644
--- a/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.cpp
+++ b/tests/auto/corelib/text/qlocale/syslocaleapp/syslocaleapp.cpp
diff --git a/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.pro b/tests/auto/corelib/text/qlocale/syslocaleapp/syslocaleapp.pro
index 3e283c05a4..3e283c05a4 100644
--- a/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.pro
+++ b/tests/auto/corelib/text/qlocale/syslocaleapp/syslocaleapp.pro
diff --git a/tests/auto/corelib/tools/qlocale/test/test.pro b/tests/auto/corelib/text/qlocale/test/test.pro
index f7243e99a7..f7243e99a7 100644
--- a/tests/auto/corelib/tools/qlocale/test/test.pro
+++ b/tests/auto/corelib/text/qlocale/test/test.pro
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
index ec8f2fc047..676c66df3e 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
@@ -1459,8 +1459,8 @@ void tst_QLocale::dayOfWeek()
QCOMPARE(QLocale::c().toString(date, "ddd"), shortName);
QCOMPARE(QLocale::c().toString(date, "dddd"), longName);
- QCOMPARE(QLocale::c().toString(date, QStringViewLiteral("ddd")), shortName);
- QCOMPARE(QLocale::c().toString(date, QStringViewLiteral("dddd")), longName);
+ QCOMPARE(QLocale::c().toString(date, u"ddd"), shortName);
+ QCOMPARE(QLocale::c().toString(date, u"dddd"), longName);
}
void tst_QLocale::formatDate_data()
diff --git a/tests/auto/corelib/tools/qregexp/.gitignore b/tests/auto/corelib/text/qregexp/.gitignore
index e6e629ee2c..e6e629ee2c 100644
--- a/tests/auto/corelib/tools/qregexp/.gitignore
+++ b/tests/auto/corelib/text/qregexp/.gitignore
diff --git a/tests/auto/corelib/tools/qregexp/qregexp.pro b/tests/auto/corelib/text/qregexp/qregexp.pro
index 5f6ff0a71c..5f6ff0a71c 100644
--- a/tests/auto/corelib/tools/qregexp/qregexp.pro
+++ b/tests/auto/corelib/text/qregexp/qregexp.pro
diff --git a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp b/tests/auto/corelib/text/qregexp/tst_qregexp.cpp
index a8111af6c1..a8111af6c1 100644
--- a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
+++ b/tests/auto/corelib/text/qregexp/tst_qregexp.cpp
diff --git a/tests/auto/corelib/tools/qregularexpression/.gitignore b/tests/auto/corelib/text/qregularexpression/.gitignore
index 4650b4454e..4650b4454e 100644
--- a/tests/auto/corelib/tools/qregularexpression/.gitignore
+++ b/tests/auto/corelib/text/qregularexpression/.gitignore
diff --git a/tests/auto/corelib/tools/qregularexpression/qregularexpression.pro b/tests/auto/corelib/text/qregularexpression/qregularexpression.pro
index ec8189717e..ec8189717e 100644
--- a/tests/auto/corelib/tools/qregularexpression/qregularexpression.pro
+++ b/tests/auto/corelib/text/qregularexpression/qregularexpression.pro
diff --git a/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp b/tests/auto/corelib/text/qregularexpression/tst_qregularexpression.cpp
index c02756d76a..c02756d76a 100644
--- a/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp
+++ b/tests/auto/corelib/text/qregularexpression/tst_qregularexpression.cpp
diff --git a/tests/auto/corelib/tools/qstring/.gitignore b/tests/auto/corelib/text/qstring/.gitignore
index c2ea8d0336..c2ea8d0336 100644
--- a/tests/auto/corelib/tools/qstring/.gitignore
+++ b/tests/auto/corelib/text/qstring/.gitignore
diff --git a/tests/auto/corelib/tools/qstring/double_data.h b/tests/auto/corelib/text/qstring/double_data.h
index 0d59ecb5ff..0d59ecb5ff 100644
--- a/tests/auto/corelib/tools/qstring/double_data.h
+++ b/tests/auto/corelib/text/qstring/double_data.h
diff --git a/tests/auto/corelib/tools/qstring/qstring.pro b/tests/auto/corelib/text/qstring/qstring.pro
index ec8a9b5df5..ec8a9b5df5 100644
--- a/tests/auto/corelib/tools/qstring/qstring.pro
+++ b/tests/auto/corelib/text/qstring/qstring.pro
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp
index e4aa00f500..cce3e601cd 100644
--- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/text/qstring/tst_qstring.cpp
@@ -4763,7 +4763,7 @@ void tst_QString::arg()
QCOMPARE( s4.arg("foo"), QLatin1String("[foo]") );
QCOMPARE( s5.arg(QLatin1String("foo")), QLatin1String("[foo]") );
- QCOMPARE( s6.arg(QStringViewLiteral("foo")), QLatin1String("[foo]") );
+ QCOMPARE( s6.arg(u"foo"), QLatin1String("[foo]") );
QCOMPARE( s7.arg("foo"), QLatin1String("[foo]") );
QCOMPARE( s8.arg("foo"), QLatin1String("[foo %1]") );
QCOMPARE( s8.arg("foo").arg("bar"), QLatin1String("[foo bar]") );
@@ -4825,10 +4825,10 @@ void tst_QString::arg()
QCOMPARE( QString("%1").arg("hello", -10), QLatin1String("hello ") );
QCOMPARE( QString("%1").arg(QLatin1String("hello"), -5), QLatin1String("hello") );
- QCOMPARE( QString("%1").arg(QStringViewLiteral("hello"), -2), QLatin1String("hello") );
+ QCOMPARE( QString("%1").arg(u"hello", -2), QLatin1String("hello") );
QCOMPARE( QString("%1").arg("hello", 0), QLatin1String("hello") );
QCOMPARE( QString("%1").arg(QLatin1String("hello"), 2), QLatin1String("hello") );
- QCOMPARE( QString("%1").arg(QStringViewLiteral("hello"), 5), QLatin1String("hello") );
+ QCOMPARE( QString("%1").arg(u"hello", 5), QLatin1String("hello") );
QCOMPARE( QString("%1").arg("hello", 10), QLatin1String(" hello") );
QCOMPARE( QString("%1%1").arg("hello"), QLatin1String("hellohello") );
QCOMPARE( QString("%2%1").arg("hello"), QLatin1String("%2hello") );
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring_mac.mm b/tests/auto/corelib/text/qstring/tst_qstring_mac.mm
index 60bd3f9b15..60bd3f9b15 100644
--- a/tests/auto/corelib/tools/qstring/tst_qstring_mac.mm
+++ b/tests/auto/corelib/text/qstring/tst_qstring_mac.mm
diff --git a/tests/auto/corelib/tools/qstring_no_cast_from_bytearray/qstring_no_cast_from_bytearray.pro b/tests/auto/corelib/text/qstring_no_cast_from_bytearray/qstring_no_cast_from_bytearray.pro
index 14dbe779db..14dbe779db 100644
--- a/tests/auto/corelib/tools/qstring_no_cast_from_bytearray/qstring_no_cast_from_bytearray.pro
+++ b/tests/auto/corelib/text/qstring_no_cast_from_bytearray/qstring_no_cast_from_bytearray.pro
diff --git a/tests/auto/corelib/tools/qstring_no_cast_from_bytearray/tst_qstring_no_cast_from_bytearray.cpp b/tests/auto/corelib/text/qstring_no_cast_from_bytearray/tst_qstring_no_cast_from_bytearray.cpp
index 47fbeb6069..47fbeb6069 100644
--- a/tests/auto/corelib/tools/qstring_no_cast_from_bytearray/tst_qstring_no_cast_from_bytearray.cpp
+++ b/tests/auto/corelib/text/qstring_no_cast_from_bytearray/tst_qstring_no_cast_from_bytearray.cpp
diff --git a/tests/auto/corelib/tools/qstringapisymmetry/.gitignore b/tests/auto/corelib/text/qstringapisymmetry/.gitignore
index d28de05438..d28de05438 100644
--- a/tests/auto/corelib/tools/qstringapisymmetry/.gitignore
+++ b/tests/auto/corelib/text/qstringapisymmetry/.gitignore
diff --git a/tests/auto/corelib/tools/qstringapisymmetry/qstringapisymmetry.pro b/tests/auto/corelib/text/qstringapisymmetry/qstringapisymmetry.pro
index a4e91e38bd..a4e91e38bd 100644
--- a/tests/auto/corelib/tools/qstringapisymmetry/qstringapisymmetry.pro
+++ b/tests/auto/corelib/text/qstringapisymmetry/qstringapisymmetry.pro
diff --git a/tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp b/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
index 24382a2b61..24382a2b61 100644
--- a/tests/auto/corelib/tools/qstringapisymmetry/tst_qstringapisymmetry.cpp
+++ b/tests/auto/corelib/text/qstringapisymmetry/tst_qstringapisymmetry.cpp
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder.pro b/tests/auto/corelib/text/qstringbuilder/qstringbuilder.pro
index d73d541502..d73d541502 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder.pro
+++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder.pro
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/qstringbuilder1.pro b/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/qstringbuilder1.pro
index d9cdad1bf5..d9cdad1bf5 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/qstringbuilder1.pro
+++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/qstringbuilder1.pro
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp b/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp
index ac7f439248..ac7f439248 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
+++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp b/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp
index 2d320748f2..2d320748f2 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp
+++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/tst_qstringbuilder1.cpp
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/qstringbuilder2.pro b/tests/auto/corelib/text/qstringbuilder/qstringbuilder2/qstringbuilder2.pro
index e134c5d934..e134c5d934 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/qstringbuilder2.pro
+++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder2/qstringbuilder2.pro
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp b/tests/auto/corelib/text/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp
index 669990c9bc..669990c9bc 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp
+++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder2/tst_qstringbuilder2.cpp
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/qstringbuilder3.pro b/tests/auto/corelib/text/qstringbuilder/qstringbuilder3/qstringbuilder3.pro
index 29607551c3..29607551c3 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/qstringbuilder3.pro
+++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder3/qstringbuilder3.pro
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp b/tests/auto/corelib/text/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp
index 397e3326bf..397e3326bf 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp
+++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder3/tst_qstringbuilder3.cpp
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/qstringbuilder4.pro b/tests/auto/corelib/text/qstringbuilder/qstringbuilder4/qstringbuilder4.pro
index e55848e4bd..e55848e4bd 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/qstringbuilder4.pro
+++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder4/qstringbuilder4.pro
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp b/tests/auto/corelib/text/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp
index 05ce334c82..05ce334c82 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp
+++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp
diff --git a/tests/auto/corelib/tools/qstringiterator/qstringiterator.pro b/tests/auto/corelib/text/qstringiterator/qstringiterator.pro
index 3a1678b5f3..3a1678b5f3 100644
--- a/tests/auto/corelib/tools/qstringiterator/qstringiterator.pro
+++ b/tests/auto/corelib/text/qstringiterator/qstringiterator.pro
diff --git a/tests/auto/corelib/tools/qstringiterator/tst_qstringiterator.cpp b/tests/auto/corelib/text/qstringiterator/tst_qstringiterator.cpp
index 7d5504c22c..7d5504c22c 100644
--- a/tests/auto/corelib/tools/qstringiterator/tst_qstringiterator.cpp
+++ b/tests/auto/corelib/text/qstringiterator/tst_qstringiterator.cpp
diff --git a/tests/auto/corelib/tools/qstringlist/.gitignore b/tests/auto/corelib/text/qstringlist/.gitignore
index 3e0cdc952f..3e0cdc952f 100644
--- a/tests/auto/corelib/tools/qstringlist/.gitignore
+++ b/tests/auto/corelib/text/qstringlist/.gitignore
diff --git a/tests/auto/corelib/tools/qstringlist/qstringlist.pro b/tests/auto/corelib/text/qstringlist/qstringlist.pro
index a87257decb..a87257decb 100644
--- a/tests/auto/corelib/tools/qstringlist/qstringlist.pro
+++ b/tests/auto/corelib/text/qstringlist/qstringlist.pro
diff --git a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp b/tests/auto/corelib/text/qstringlist/tst_qstringlist.cpp
index 66d4744454..66d4744454 100644
--- a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
+++ b/tests/auto/corelib/text/qstringlist/tst_qstringlist.cpp
diff --git a/tests/auto/corelib/tools/qstringmatcher/.gitignore b/tests/auto/corelib/text/qstringmatcher/.gitignore
index 3c7caf8490..3c7caf8490 100644
--- a/tests/auto/corelib/tools/qstringmatcher/.gitignore
+++ b/tests/auto/corelib/text/qstringmatcher/.gitignore
diff --git a/tests/auto/corelib/tools/qstringmatcher/qstringmatcher.pro b/tests/auto/corelib/text/qstringmatcher/qstringmatcher.pro
index e34928776f..e34928776f 100644
--- a/tests/auto/corelib/tools/qstringmatcher/qstringmatcher.pro
+++ b/tests/auto/corelib/text/qstringmatcher/qstringmatcher.pro
diff --git a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp b/tests/auto/corelib/text/qstringmatcher/tst_qstringmatcher.cpp
index 2d577bb0ab..2d577bb0ab 100644
--- a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
+++ b/tests/auto/corelib/text/qstringmatcher/tst_qstringmatcher.cpp
diff --git a/tests/auto/corelib/tools/qstringref/qstringref.pro b/tests/auto/corelib/text/qstringref/qstringref.pro
index 04f3ba6a92..04f3ba6a92 100644
--- a/tests/auto/corelib/tools/qstringref/qstringref.pro
+++ b/tests/auto/corelib/text/qstringref/qstringref.pro
diff --git a/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp b/tests/auto/corelib/text/qstringref/tst_qstringref.cpp
index 6f01947131..6f01947131 100644
--- a/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp
+++ b/tests/auto/corelib/text/qstringref/tst_qstringref.cpp
diff --git a/tests/auto/corelib/tools/qstringview/.gitignore b/tests/auto/corelib/text/qstringview/.gitignore
index 5f757d448a..5f757d448a 100644
--- a/tests/auto/corelib/tools/qstringview/.gitignore
+++ b/tests/auto/corelib/text/qstringview/.gitignore
diff --git a/tests/auto/corelib/tools/qstringview/qstringview.pro b/tests/auto/corelib/text/qstringview/qstringview.pro
index e0e9973c91..e0e9973c91 100644
--- a/tests/auto/corelib/tools/qstringview/qstringview.pro
+++ b/tests/auto/corelib/text/qstringview/qstringview.pro
diff --git a/tests/auto/corelib/tools/qstringview/tst_qstringview.cpp b/tests/auto/corelib/text/qstringview/tst_qstringview.cpp
index 794f39708a..5d95f43d6a 100644
--- a/tests/auto/corelib/tools/qstringview/tst_qstringview.cpp
+++ b/tests/auto/corelib/text/qstringview/tst_qstringview.cpp
@@ -251,7 +251,7 @@ void tst_QStringView::constExpr() const
Q_STATIC_ASSERT(sv2.empty());
}
{
- constexpr QStringView sv = QStringViewLiteral("");
+ constexpr QStringView sv = u"";
Q_STATIC_ASSERT(sv.size() == 0);
Q_STATIC_ASSERT(!sv.isNull());
Q_STATIC_ASSERT(sv.empty());
@@ -263,7 +263,7 @@ void tst_QStringView::constExpr() const
Q_STATIC_ASSERT(sv2.empty());
}
{
- constexpr QStringView sv = QStringViewLiteral("Hello");
+ constexpr QStringView sv = u"Hello";
Q_STATIC_ASSERT(sv.size() == 5);
Q_STATIC_ASSERT(!sv.empty());
Q_STATIC_ASSERT(!sv.isEmpty());
@@ -465,7 +465,7 @@ void tst_QStringView::arg() const
#undef CHECK2
#undef CHECK1
- QCOMPARE(QStringViewLiteral(" %2 %2 %1 %3 ").arg(QLatin1Char('c'), QChar::CarriageReturn, u'C'), " \r \r c C ");
+ QCOMPARE(QStringView(u" %2 %2 %1 %3 ").arg(QLatin1Char('c'), QChar::CarriageReturn, u'C'), " \r \r c C ");
}
void tst_QStringView::fromQString() const
@@ -662,9 +662,9 @@ void tst_QStringView::conversion_tests(String string) const
void tst_QStringView::comparison()
{
- const QStringView aa = QStringViewLiteral("aa");
- const QStringView upperAa = QStringViewLiteral("AA");
- const QStringView bb = QStringViewLiteral("bb");
+ const QStringView aa = u"aa";
+ const QStringView upperAa = u"AA";
+ const QStringView bb = u"bb";
QVERIFY(aa == aa);
QVERIFY(aa != bb);
diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/.gitignore b/tests/auto/corelib/text/qtextboundaryfinder/.gitignore
index bd0df58233..bd0df58233 100644
--- a/tests/auto/corelib/tools/qtextboundaryfinder/.gitignore
+++ b/tests/auto/corelib/text/qtextboundaryfinder/.gitignore
diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/data/GraphemeBreakTest.txt b/tests/auto/corelib/text/qtextboundaryfinder/data/GraphemeBreakTest.txt
index d7d8f90de0..d7d8f90de0 100644
--- a/tests/auto/corelib/tools/qtextboundaryfinder/data/GraphemeBreakTest.txt
+++ b/tests/auto/corelib/text/qtextboundaryfinder/data/GraphemeBreakTest.txt
diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/data/LineBreakTest.txt b/tests/auto/corelib/text/qtextboundaryfinder/data/LineBreakTest.txt
index 6715446aba..6715446aba 100644
--- a/tests/auto/corelib/tools/qtextboundaryfinder/data/LineBreakTest.txt
+++ b/tests/auto/corelib/text/qtextboundaryfinder/data/LineBreakTest.txt
diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/data/SentenceBreakTest.txt b/tests/auto/corelib/text/qtextboundaryfinder/data/SentenceBreakTest.txt
index 2985b84cf8..2985b84cf8 100644
--- a/tests/auto/corelib/tools/qtextboundaryfinder/data/SentenceBreakTest.txt
+++ b/tests/auto/corelib/text/qtextboundaryfinder/data/SentenceBreakTest.txt
diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/data/WordBreakTest.txt b/tests/auto/corelib/text/qtextboundaryfinder/data/WordBreakTest.txt
index 63761026ce..63761026ce 100644
--- a/tests/auto/corelib/tools/qtextboundaryfinder/data/WordBreakTest.txt
+++ b/tests/auto/corelib/text/qtextboundaryfinder/data/WordBreakTest.txt
diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro b/tests/auto/corelib/text/qtextboundaryfinder/qtextboundaryfinder.pro
index 3c9f03842d..3c9f03842d 100644
--- a/tests/auto/corelib/tools/qtextboundaryfinder/qtextboundaryfinder.pro
+++ b/tests/auto/corelib/text/qtextboundaryfinder/qtextboundaryfinder.pro
diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/testdata.qrc b/tests/auto/corelib/text/qtextboundaryfinder/testdata.qrc
index 0cc4ccaa57..0cc4ccaa57 100644
--- a/tests/auto/corelib/tools/qtextboundaryfinder/testdata.qrc
+++ b/tests/auto/corelib/text/qtextboundaryfinder/testdata.qrc
diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp b/tests/auto/corelib/text/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
index a46011ff6c..a46011ff6c 100644
--- a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
+++ b/tests/auto/corelib/text/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
diff --git a/tests/auto/corelib/text/text.pro b/tests/auto/corelib/text/text.pro
new file mode 100644
index 0000000000..09d58bd74c
--- /dev/null
+++ b/tests/auto/corelib/text/text.pro
@@ -0,0 +1,23 @@
+TEMPLATE = subdirs
+
+SUBDIRS = \
+ qbytearray \
+ qbytearraylist \
+ qbytearraymatcher \
+ qbytedatabuffer \
+ qchar \
+ qcollator \
+ qlatin1string \
+ qlocale \
+ qregexp \
+ qregularexpression \
+ qstring \
+ qstring_no_cast_from_bytearray \
+ qstringapisymmetry \
+ qstringbuilder \
+ qstringiterator \
+ qstringlist \
+ qstringmatcher \
+ qstringref \
+ qstringview \
+ qtextboundaryfinder
diff --git a/tests/auto/corelib/thread/qsemaphore/BLACKLIST b/tests/auto/corelib/thread/qsemaphore/BLACKLIST
index 0786f50417..f61f4c1a3b 100644
--- a/tests/auto/corelib/thread/qsemaphore/BLACKLIST
+++ b/tests/auto/corelib/thread/qsemaphore/BLACKLIST
@@ -1,3 +1,6 @@
+[tryAcquireWithTimeout]
+osx-10.12
+osx-10.13
[tryAcquireWithTimeout:0.2s]
windows
osx-10.12
diff --git a/tests/auto/corelib/thread/qthread/BLACKLIST b/tests/auto/corelib/thread/qthread/BLACKLIST
index ccf530362c..87538a1048 100644
--- a/tests/auto/corelib/thread/qthread/BLACKLIST
+++ b/tests/auto/corelib/thread/qthread/BLACKLIST
@@ -1,4 +1,7 @@
[wait3_slowDestructor]
-windows
+windows-10 msvc-2015
+windows-7sp1
+windows-10 msvc-2017
[sleep]
-windows ci
+windows-7sp1
+
diff --git a/tests/auto/corelib/thread/qthreadpool/BLACKLIST b/tests/auto/corelib/thread/qthreadpool/BLACKLIST
index fc49731687..e4f2fcd822 100644
--- a/tests/auto/corelib/thread/qthreadpool/BLACKLIST
+++ b/tests/auto/corelib/thread/qthreadpool/BLACKLIST
@@ -1,3 +1,7 @@
[expiryTimeoutRace]
-osx
-linux
+rhel-7.6
+opensuse-leap
+osx-10.13
+ubuntu-18.04
+osx-10.12
+opensuse-42.3
diff --git a/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp
index 112c36952c..60e8d8cba2 100644
--- a/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp
+++ b/tests/auto/corelib/thread/qthreadpool/tst_qthreadpool.cpp
@@ -92,7 +92,9 @@ private slots:
void priorityStart();
void waitForDone();
void clear();
+#if QT_DEPRECATED_SINCE(5, 9)
void cancel();
+#endif
void tryTake();
void waitForDoneTimeout();
void destroyingWaitsForTasksToFinish();
@@ -963,6 +965,7 @@ void tst_QThreadPool::clear()
QCOMPARE(count.loadRelaxed(), threadPool.maxThreadCount());
}
+#if QT_DEPRECATED_SINCE(5, 9)
void tst_QThreadPool::cancel()
{
QSemaphore sem(0);
@@ -1034,6 +1037,7 @@ void tst_QThreadPool::cancel()
delete runnables[0]; //if the pool deletes them then we'll get double-free crash
delete runnables[runs-1];
}
+#endif
void tst_QThreadPool::tryTake()
{
diff --git a/tests/auto/corelib/thread/qwaitcondition/BLACKLIST b/tests/auto/corelib/thread/qwaitcondition/BLACKLIST
deleted file mode 100644
index 3ff336576b..0000000000
--- a/tests/auto/corelib/thread/qwaitcondition/BLACKLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-[wakeOne]
-windows
diff --git a/tests/auto/corelib/time/qdatetime/BLACKLIST b/tests/auto/corelib/time/qdatetime/BLACKLIST
deleted file mode 100644
index 3a42ee066b..0000000000
--- a/tests/auto/corelib/time/qdatetime/BLACKLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-[timeZoneAbbreviation]
-osx
diff --git a/tests/auto/corelib/tools/collections/BLACKLIST b/tests/auto/corelib/tools/collections/BLACKLIST
new file mode 100644
index 0000000000..c6e289aadb
--- /dev/null
+++ b/tests/auto/corelib/tools/collections/BLACKLIST
@@ -0,0 +1,2 @@
+[insert_remove_loop]
+msvc-2019
diff --git a/tests/auto/corelib/tools/collections/collections.pro b/tests/auto/corelib/tools/collections/collections.pro
index b074fa9338..e0f9f0a0ea 100644
--- a/tests/auto/corelib/tools/collections/collections.pro
+++ b/tests/auto/corelib/tools/collections/collections.pro
@@ -4,5 +4,6 @@ SOURCES += tst_collections.cpp
QT = core testlib
# This test does not work with strict iterators
+DEFINES -= QT_NO_LINKED_LIST
DEFINES -= QT_STRICT_ITERATORS
DEFINES -= QT_NO_JAVA_STYLE_ITERATORS
diff --git a/tests/auto/corelib/tools/containerapisymmetry/containerapisymmetry.pro b/tests/auto/corelib/tools/containerapisymmetry/containerapisymmetry.pro
index 30dc8026ef..e46d51761e 100644
--- a/tests/auto/corelib/tools/containerapisymmetry/containerapisymmetry.pro
+++ b/tests/auto/corelib/tools/containerapisymmetry/containerapisymmetry.pro
@@ -5,3 +5,4 @@ QT = core testlib
# This test does not work with strict iterators
DEFINES -= QT_STRICT_ITERATORS
+DEFINES -= QT_NO_LINKED_LIST
diff --git a/tests/auto/corelib/tools/qline/tst_qline.cpp b/tests/auto/corelib/tools/qline/tst_qline.cpp
index 0418daf640..31aa5b4e0c 100644
--- a/tests/auto/corelib/tools/qline/tst_qline.cpp
+++ b/tests/auto/corelib/tools/qline/tst_qline.cpp
@@ -207,7 +207,10 @@ void tst_QLine::testIntersection()
QPointF ip;
- QLineF::IntersectionType itype = a.intersect(b, &ip);
+ QLineF::IntersectionType itype = a.intersects(b, &ip);
+#if QT_DEPRECATED_SINCE(5, 14)
+ QCOMPARE(a.intersect(b, &ip), itype);
+#endif
QCOMPARE(int(itype), type);
if (type != QLineF::NoIntersection) {
diff --git a/tests/auto/corelib/tools/qlinkedlist/qlinkedlist.pro b/tests/auto/corelib/tools/qlinkedlist/qlinkedlist.pro
index 80630f78ad..378c574eb0 100644
--- a/tests/auto/corelib/tools/qlinkedlist/qlinkedlist.pro
+++ b/tests/auto/corelib/tools/qlinkedlist/qlinkedlist.pro
@@ -2,3 +2,4 @@ CONFIG += testcase
TARGET = tst_qlinkedlist
QT = core testlib
SOURCES = tst_qlinkedlist.cpp
+DEFINES -= QT_NO_LINKED_LIST
diff --git a/tests/auto/corelib/tools/qlocale/BLACKLIST b/tests/auto/corelib/tools/qlocale/BLACKLIST
deleted file mode 100644
index 3eac7c10ed..0000000000
--- a/tests/auto/corelib/tools/qlocale/BLACKLIST
+++ /dev/null
@@ -1,2 +0,0 @@
-[formatTimeZone]
-osx
diff --git a/tests/auto/corelib/tools/qtimeline/BLACKLIST b/tests/auto/corelib/tools/qtimeline/BLACKLIST
index 5611969b4d..b60cab31fa 100644
--- a/tests/auto/corelib/tools/qtimeline/BLACKLIST
+++ b/tests/auto/corelib/tools/qtimeline/BLACKLIST
@@ -1,9 +1,9 @@
[interpolation]
-windows
osx-10.12
+windows-10 msvc-2015
osx-10.13
-[duration]
-windows
+windows-7sp1
[frameRate]
osx-10.12
osx-10.13
+
diff --git a/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp b/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
index 070c25368b..3d90644aa3 100644
--- a/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
+++ b/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp
@@ -64,21 +64,21 @@ private:
void initializeList();
};
-int fooCtor = 0;
-int fooDtor = 0;
-
-struct Foo
+struct Tracker
{
- int *p;
-
- Foo() { p = new int; ++fooCtor; }
- Foo(const Foo &/*other*/) { p = new int; ++fooCtor; }
+ static int count;
+ Tracker() { ++count; }
+ Tracker(const Tracker &) { ++count; }
+ Tracker(Tracker &&) { ++count; }
- void operator=(const Foo & /* other */) { }
+ Tracker &operator=(const Tracker &) = default;
+ Tracker &operator=(Tracker &&) = default;
- ~Foo() { delete p; ++fooDtor; }
+ ~Tracker() { --count; }
};
+int Tracker::count = 0;
+
void tst_QVarLengthArray::append()
{
QVarLengthArray<QString, 2> v;
@@ -130,6 +130,23 @@ void tst_QVarLengthArray::removeLast()
v.removeLast();
QCOMPARE(v.size(), 2);
}
+
+ {
+ Tracker t;
+ QCOMPARE(Tracker::count, 1);
+ QVarLengthArray<Tracker, 2> v;
+ v.append(t);
+ v.append({});
+ QCOMPARE(Tracker::count, 3);
+ v.removeLast();
+ QCOMPARE(Tracker::count, 2);
+ v.append(t);
+ v.append({});
+ QCOMPARE(Tracker::count, 4);
+ v.removeLast();
+ QCOMPARE(Tracker::count, 3);
+ }
+ QCOMPARE(Tracker::count, 0);
}
void tst_QVarLengthArray::oldTests()
diff --git a/tests/auto/corelib/tools/qvector/tst_qvector.cpp b/tests/auto/corelib/tools/qvector/tst_qvector.cpp
index 3256130472..05b5579d64 100644
--- a/tests/auto/corelib/tools/qvector/tst_qvector.cpp
+++ b/tests/auto/corelib/tools/qvector/tst_qvector.cpp
@@ -253,6 +253,7 @@ private slots:
void fillInt() const;
void fillMovable() const;
void fillCustom() const;
+ void fillDetaches() const;
void first() const;
void fromListInt() const;
void fromListMovable() const;
@@ -1310,6 +1311,16 @@ void tst_QVector::fillCustom() const
QCOMPARE(instancesCount, Custom::counter.loadAcquire());
}
+void tst_QVector::fillDetaches() const
+{
+ QVector<int> test = { 1, 2, 3 };
+ QVector<int> copy = test;
+ copy.fill(42);
+
+ QCOMPARE(test, QVector<int>({1, 2, 3}));
+ QCOMPARE(copy, QVector<int>({42, 42, 42}));
+}
+
void tst_QVector::first() const
{
QVector<int> myvec;
diff --git a/tests/auto/corelib/tools/tools.pro b/tests/auto/corelib/tools/tools.pro
index 243e7e96f5..49b2a1f075 100644
--- a/tests/auto/corelib/tools/tools.pro
+++ b/tests/auto/corelib/tools/tools.pro
@@ -6,13 +6,7 @@ SUBDIRS=\
qarraydata \
qarraydata_strictiterators \
qbitarray \
- qbytearray \
- qbytearraylist \
- qbytearraymatcher \
- qbytedatabuffer \
qcache \
- qchar \
- qcollator \
qcommandlineparser \
qcontiguouscache \
qcryptographichash \
@@ -22,12 +16,10 @@ SUBDIRS=\
qhash \
qhash_strictiterators \
qhashfunctions \
- qlatin1string \
qline \
qlinkedlist \
qlist \
qlist_strictiterators \
- qlocale \
qmakearray \
qmap \
qmap_strictiterators \
@@ -39,8 +31,6 @@ SUBDIRS=\
qpointf \
qqueue \
qrect \
- qregexp \
- qregularexpression \
qringbuffer \
qscopedpointer \
qscopedvaluerollback \
@@ -50,16 +40,6 @@ SUBDIRS=\
qsize \
qsizef \
qstl \
- qstring \
- qstring_no_cast_from_bytearray \
- qstringapisymmetry \
- qstringbuilder \
- qstringiterator \
- qstringlist \
- qstringmatcher \
- qstringref \
- qstringview \
- qtextboundaryfinder \
qtimeline \
qvarlengtharray \
qvector \