diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2021-11-23 07:26:40 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2021-11-23 12:19:32 -0800 |
commit | 5eda43de89d936a0261949519a0653a66e82b03b (patch) | |
tree | 0575d89415a23d60eab1e63b3c3cccbbe6f2f2df /tests/auto/corelib/tools | |
parent | 3f56950862181f4d50f30d66f577c933795522c3 (diff) |
tst_QHashSeed: reset the global seed in each iteration
QHashSeed is not a random number generator (though it uses one). It
returns the same value over and over again unless you reset it to a new,
random seed.
Fixes: QTBUG-98480
Change-Id: I89446ea06b5742efb194fffd16ba36601f08d794
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/auto/corelib/tools')
-rw-r--r-- | tests/auto/corelib/tools/qhashseed/tst_qhashseed.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qhashseed/tst_qhashseed.cpp b/tests/auto/corelib/tools/qhashseed/tst_qhashseed.cpp index 3d3b529f29..f726a29d97 100644 --- a/tests/auto/corelib/tools/qhashseed/tst_qhashseed.cpp +++ b/tests/auto/corelib/tools/qhashseed/tst_qhashseed.cpp @@ -152,6 +152,8 @@ void tst_QHashSeed::quality() ++oneThird; if (seed == BadSeed) ++badSeeds; + + QHashSeed::resetRandomGlobalSeed(); } // report out |