diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2022-09-21 10:32:54 +0200 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2022-09-22 17:34:51 +0200 |
commit | c633f4644c0065964345402535d54f3749431d82 (patch) | |
tree | 158340e6d1e45baaebb5640380050bc5425b7e83 /tests/auto/corelib | |
parent | f553e4b4c37c3ff33f167ea9264115474f666097 (diff) |
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.
Pick-to: 6.4
Change-Id: I78c45eed0f35a13af6d6da75d7189a6933750f13
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r-- | tests/auto/corelib/tools/qhash/tst_qhash.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/tools/qhash/tst_qhash.cpp b/tests/auto/corelib/tools/qhash/tst_qhash.cpp index 5c0fbab406..bb73a267a5 100644 --- a/tests/auto/corelib/tools/qhash/tst_qhash.cpp +++ b/tests/auto/corelib/tools/qhash/tst_qhash.cpp @@ -1644,9 +1644,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); } } |