summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qstring/tst_qstring.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-02-19 14:56:24 +0100
committerLiang Qi <liang.qi@qt.io>2018-02-19 16:02:52 +0100
commit48577b2e7f17a26c1d903cb8ecbd30e41c231137 (patch)
treee7498f68a15e2e18b8412eefe7f248d379d94d99 /tests/auto/corelib/tools/qstring/tst_qstring.cpp
parentfa0906bc5664913f232721d611e6e7906892d766 (diff)
parent6c6ace9d23f90845fd424e474d38fe30f070775e (diff)
Merge remote-tracking branch 'origin/5.10.1' into 5.11
Conflicts: src/plugins/sqldrivers/psql/qsql_psql.cpp Change-Id: I070b455078b41e75c46562fcea5676d6218cd00c
Diffstat (limited to 'tests/auto/corelib/tools/qstring/tst_qstring.cpp')
-rw-r--r--tests/auto/corelib/tools/qstring/tst_qstring.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
index 90cd70f43e..86cc2cd02f 100644
--- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
@@ -6049,8 +6049,14 @@ void tst_QString::compare_data()
QTest::addColumn<int>("csr"); // case sensitive result
QTest::addColumn<int>("cir"); // case insensitive result
-
// null strings
+ QTest::newRow("null-null") << QString() << QString() << 0 << 0;
+ QTest::newRow("text-null") << QString("a") << QString() << 1 << 1;
+ QTest::newRow("null-text") << QString() << QString("a") << -1 << -1;
+ QTest::newRow("null-empty") << QString() << QString("") << 0 << 0;
+ QTest::newRow("empty-null") << QString("") << QString() << 0 << 0;
+
+ // empty strings
QTest::newRow("data0") << QString("") << QString("") << 0 << 0;
QTest::newRow("data1") << QString("a") << QString("") << 1 << 1;
QTest::newRow("data2") << QString("") << QString("a") << -1 << -1;