diff --git a/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp b/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp index 0c890eafbcb..1e09da1fe47 100644 --- a/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp +++ b/tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp @@ -134,6 +134,14 @@ void tst_QHashFunctions::qhash_of_empty_and_null_qstring() QString null, empty(""); QCOMPARE(null, empty); QCOMPARE(qHash(null), qHash(empty)); + + QStringRef nullRef, emptyRef(&empty); + QCOMPARE(nullRef, emptyRef); + QCOMPARE(qHash(nullRef), qHash(emptyRef)); + + QStringView nullView, emptyView(empty); + QCOMPARE(nullView, emptyView); + QCOMPARE(qHash(nullView), qHash(emptyView)); } void tst_QHashFunctions::qhash_of_empty_and_null_qbytearray()