Extend the check for null and empty QString hashing to QString{Ref,View}
Change-Id: I5c41287991f6dd2eeb3d54699da0f653bfac59be Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
c608ffc56a
commit
f672bd6316
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user