diff options
author | luigi1111 <luigi1111w@gmail.com> | 2019-08-19 17:31:39 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2019-08-19 17:31:39 -0500 |
commit | f205d28e96ef86303475a57b3fea15d2ede8a752 (patch) | |
tree | 441fdb1de85bd9eaf60b65fbfbfe3019957bb224 /tests/unit_tests | |
parent | Merge pull request #5725 (diff) | |
parent | Replace std::random_shuffle with std::shuffle (diff) | |
download | monero-f205d28e96ef86303475a57b3fea15d2ede8a752.tar.xz |
Merge pull request #5727
7b9a420 Replace std::random_shuffle with std::shuffle (tomsmeding)
Diffstat (limited to 'tests/unit_tests')
-rw-r--r-- | tests/unit_tests/ringct.cpp | 4 | ||||
-rw-r--r-- | tests/unit_tests/rolling_median.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit_tests/ringct.cpp b/tests/unit_tests/ringct.cpp index 4d51ec434..d2b2c3109 100644 --- a/tests/unit_tests/ringct.cpp +++ b/tests/unit_tests/ringct.cpp @@ -779,8 +779,8 @@ TEST(ringct, range_proofs_accept_very_long_simple) inputs[n] = n; outputs[n] = n; } - std::random_shuffle(inputs, inputs + N); - std::random_shuffle(outputs, outputs + N); + std::shuffle(inputs, inputs + N, crypto::random_device{}); + std::shuffle(outputs, outputs + N, crypto::random_device{}); EXPECT_TRUE(range_proof_test(true, NELTS(inputs), inputs, NELTS(outputs), outputs, false, true)); } diff --git a/tests/unit_tests/rolling_median.cpp b/tests/unit_tests/rolling_median.cpp index 547fe092f..9e4cf87b8 100644 --- a/tests/unit_tests/rolling_median.cpp +++ b/tests/unit_tests/rolling_median.cpp @@ -143,7 +143,7 @@ TEST(rolling_median, order) m.insert(random[i]); ASSERT_EQ(med, m.median()); - std::shuffle(random.begin(), random.end(), std::default_random_engine(crypto::rand<unsigned>())); + std::shuffle(random.begin(), random.end(), crypto::random_device{}); m.clear(); for (int i = 0; i < 1000; ++i) m.insert(random[i]); |