tst_QHash: Fix outdated rehash test
Inserting the same key repeatedly with QMultiHash will not test rehashing behavior because in Qt6 those entries all end up in a linked list. Change-Id: I78c45eed0f35a13af6d6da75d7189a6933750f13 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit c633f4644c0065964345402535d54f3749431d82) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
8f1fc6c2c4
commit
b404ad5894
@ -1629,9 +1629,9 @@ void tst_QHash::rehash_isnt_quadratic()
|
||||
{
|
||||
// this test should be incredibly slow if rehash() is quadratic
|
||||
for (int j = 0; j < 5; ++j) {
|
||||
QMultiHash<int, int> testHash;
|
||||
QHash<int, int> testHash;
|
||||
for (int i = 0; i < 500000; ++i)
|
||||
testHash.insert(1, 1);
|
||||
testHash.insert(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user