summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qhashfunctions
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2016-07-15 20:47:57 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2016-07-15 20:47:57 +0200
commit82ea53ad24c92b345ac2b542a174887f5de5723a (patch)
tree7d326274b52bbedac481be522a20732f77457073 /tests/auto/corelib/tools/qhashfunctions
parente46e112eb10850801218bd810ecaeb8fd29f4c34 (diff)
parent178ab885626bcd67507fde7f67f65c1872ac3be3 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: qmake/library/qmakeevaluator.cpp One side changed the iterator to use ranged-for, the other changed its body; they only conflicted because the latter had to add braces around the body, intruding on the for-line. Trivial resolution. Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
Diffstat (limited to 'tests/auto/corelib/tools/qhashfunctions')
-rw-r--r--tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp b/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp
index 7cdee891bb..1a70ac5e75 100644
--- a/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp
+++ b/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp
@@ -40,6 +40,8 @@ class tst_QHashFunctions : public QObject
Q_OBJECT
private Q_SLOTS:
void qhash();
+ void qhash_of_empty_and_null_qstring();
+ void qhash_of_empty_and_null_qbytearray();
void fp_qhash_of_zero_is_zero();
void qthash_data();
void qthash();
@@ -128,6 +130,20 @@ void tst_QHashFunctions::qhash()
}
}
+void tst_QHashFunctions::qhash_of_empty_and_null_qstring()
+{
+ QString null, empty("");
+ QCOMPARE(null, empty);
+ QCOMPARE(qHash(null), qHash(empty));
+}
+
+void tst_QHashFunctions::qhash_of_empty_and_null_qbytearray()
+{
+ QByteArray null, empty("");
+ QCOMPARE(null, empty);
+ QCOMPARE(qHash(null), qHash(empty));
+}
+
void tst_QHashFunctions::fp_qhash_of_zero_is_zero()
{
QCOMPARE(qHash(-0.0f), 0U);