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>
This commit is contained in:
Thiago Macieira 2021-11-23 07:26:40 -08:00
parent 3f56950862
commit 5eda43de89

View File

@ -152,6 +152,8 @@ void tst_QHashSeed::quality()
++oneThird; ++oneThird;
if (seed == BadSeed) if (seed == BadSeed)
++badSeeds; ++badSeeds;
QHashSeed::resetRandomGlobalSeed();
} }
// report out // report out