summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2016-09-15 18:22:50 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2016-09-15 18:22:50 +0000
commiteecc5fc52c919d6607e610d858c2749977a1ef75 (patch)
treedc8c5f6621d6fbaa76bd28c1c127905444ccf50e /tests/auto/corelib
parent6b3845320a9242481842243f2c019aa11ce396df (diff)
parent40a1f69e8663fb79560c26cfad5ead45b1b3ee5f (diff)
Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/dev
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/json/json.pro2
-rw-r--r--tests/auto/corelib/plugin/plugin.pro3
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/test/test.pro3
-rw-r--r--tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp14
-rw-r--r--tests/auto/corelib/tools/qcollator/qcollator.pro2
-rw-r--r--tests/auto/corelib/tools/qstring/qstring.pro2
6 files changed, 16 insertions, 10 deletions
diff --git a/tests/auto/corelib/json/json.pro b/tests/auto/corelib/json/json.pro
index dc9cd3e383..16c2ae2fb7 100644
--- a/tests/auto/corelib/json/json.pro
+++ b/tests/auto/corelib/json/json.pro
@@ -1,5 +1,5 @@
TARGET = tst_json
-QT = core testlib
+QT = core-private testlib
CONFIG -= app_bundle
CONFIG += testcase
diff --git a/tests/auto/corelib/plugin/plugin.pro b/tests/auto/corelib/plugin/plugin.pro
index 777e920995..774edc655a 100644
--- a/tests/auto/corelib/plugin/plugin.pro
+++ b/tests/auto/corelib/plugin/plugin.pro
@@ -3,8 +3,7 @@ SUBDIRS=\
qfactoryloader \
quuid
-load(qfeatures)
-!contains(QT_DISABLED_FEATURES, library): SUBDIRS += \
+qtConfig(library): SUBDIRS += \
qpluginloader \
qplugin \
qlibrary
diff --git a/tests/auto/corelib/plugin/qfactoryloader/test/test.pro b/tests/auto/corelib/plugin/qfactoryloader/test/test.pro
index f1e76c31bf..3345651730 100644
--- a/tests/auto/corelib/plugin/qfactoryloader/test/test.pro
+++ b/tests/auto/corelib/plugin/qfactoryloader/test/test.pro
@@ -19,7 +19,6 @@ win32 {
mac: CONFIG -= app_bundle
-load(qfeatures)
-contains(QT_DISABLED_FEATURES, library) {
+!qtConfig(library) {
LIBS += -L ../bin/ -lplugin1 -lplugin2
}
diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
index 88c505601a..310c5f6fd3 100644
--- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
@@ -778,9 +778,17 @@ void tst_QByteArray::qstrncpy()
{
QByteArray src(1024, 'a'), dst(1024, 'b');
- // singularities
- QCOMPARE(::qstrncpy(0, 0,0), (char*)0);
- QCOMPARE(::qstrncpy(dst.data(), 0, 0), (char*)0);
+ // dst == nullptr
+ QCOMPARE(::qstrncpy(0, src.data(), 0), (char*)0);
+ QCOMPARE(::qstrncpy(0, src.data(), 10), (char*)0);
+
+ // src == nullptr
+ QCOMPARE(::qstrncpy(dst.data(), 0, 0), (char*)0);
+ QCOMPARE(::qstrncpy(dst.data(), 0, 10), (char*)0);
+
+ // valid pointers, but len == 0
+ QCOMPARE(::qstrncpy(dst.data(), src.data(), 0), dst.data());
+ QCOMPARE(*dst.data(), 'b'); // must not have written to dst
// normal copy
QCOMPARE(::qstrncpy(dst.data(), src.data(), src.size()), dst.data());
diff --git a/tests/auto/corelib/tools/qcollator/qcollator.pro b/tests/auto/corelib/tools/qcollator/qcollator.pro
index 7725194e3d..2f3995a75f 100644
--- a/tests/auto/corelib/tools/qcollator/qcollator.pro
+++ b/tests/auto/corelib/tools/qcollator/qcollator.pro
@@ -1,6 +1,6 @@
CONFIG += testcase
TARGET = tst_qcollator
-QT = core testlib
+QT = core-private testlib
SOURCES = tst_qcollator.cpp
DEFINES += QT_NO_CAST_TO_ASCII
qtConfig(icu): DEFINES += QT_USE_ICU
diff --git a/tests/auto/corelib/tools/qstring/qstring.pro b/tests/auto/corelib/tools/qstring/qstring.pro
index a94ad3405a..ec8a9b5df5 100644
--- a/tests/auto/corelib/tools/qstring/qstring.pro
+++ b/tests/auto/corelib/tools/qstring/qstring.pro
@@ -1,6 +1,6 @@
CONFIG += testcase
TARGET = tst_qstring
-QT = core testlib
+QT = core-private testlib
SOURCES = tst_qstring.cpp
DEFINES += QT_NO_CAST_TO_ASCII
qtConfig(icu): DEFINES += QT_USE_ICU