aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fuzzy-test
diff options
context:
space:
mode:
authorIvan Komissarov <ABBAPOH@gmail.com>2019-11-19 23:38:40 +0900
committerIvan Komissarov <ABBAPOH@gmail.com>2019-11-20 11:29:21 +0000
commit36d6566ce7a97556f30628c378037d4162fee8f7 (patch)
tree197b42bbccb171386049718c5f2ddbcf786e22c5 /tests/fuzzy-test
parent0c17bb8a6c38681c3f0fff92f7ebebfc7a6aabc9 (diff)
Fix compiler warnings on macOS
Change-Id: I865357bf74bdaf88eabae5681c70a6e5032e274d Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/fuzzy-test')
-rw-r--r--tests/fuzzy-test/fuzzytester.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/fuzzy-test/fuzzytester.cpp b/tests/fuzzy-test/fuzzytester.cpp
index b836ee623..045e46718 100644
--- a/tests/fuzzy-test/fuzzytester.cpp
+++ b/tests/fuzzy-test/fuzzytester.cpp
@@ -36,6 +36,7 @@
#include <algorithm>
#include <cstdlib>
#include <ctime>
+#include <random>
static QString resolveIncrementalActivity() { return "resolve-incremental"; }
static QString buildIncrementalActivity() { return "build-incremental"; }
@@ -71,7 +72,7 @@ void FuzzyTester::runTest(const QString &profile, const QString &startCommit,
// Shuffle the initial sequence. Otherwise all invocations of the tool with the same start
// commit would try the same sequence of commits.
std::srand(std::time(nullptr));
- std::random_shuffle(allCommits.begin(), allCommits.end());
+ std::shuffle(allCommits.begin(), allCommits.end(), std::mt19937(std::random_device()()));
quint64 run = 0;
QStringList buildSequence(workingStartCommit);