Replace randomization code, fixes #973

This commit is contained in:
Dale Glass 2024-06-01 19:46:34 +02:00
parent 09e5a60c8b
commit bbc7c0a146

View file

@ -18,6 +18,7 @@
#include <QtCore/QQueue>
#include <test-utils/GLMTestUtils.h>
#include <test-utils/QTestExtensions.h>
#include <QRandomGenerator64>
QTEST_MAIN(MovingPercentileTests)
@ -41,10 +42,7 @@ void MovingPercentileTests::testRunningMedian() {
int64_t MovingPercentileTests::random() {
return ((int64_t) rand() << 48) ^
((int64_t) rand() << 32) ^
((int64_t) rand() << 16) ^
((int64_t) rand());
return QRandomGenerator64::global()->generate();
}
void MovingPercentileTests::testRunningMinForN (int n) {