diff options
Diffstat (limited to 'src/test/prevector_tests.cpp')
-rw-r--r-- | src/test/prevector_tests.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/prevector_tests.cpp b/src/test/prevector_tests.cpp index 674221e009..5d9d187268 100644 --- a/src/test/prevector_tests.cpp +++ b/src/test/prevector_tests.cpp @@ -209,10 +209,10 @@ BOOST_AUTO_TEST_CASE(PrevectorTestInt) test.resize(new_size); } if (insecure_randbits(3) == 3) { - test.insert(insecure_randrange(test.size() + 1), 1 + insecure_randrange(2), insecure_rand()); + test.insert(insecure_randrange(test.size() + 1), 1 + insecure_randbool(), insecure_rand()); } if (insecure_randbits(3) == 4) { - int del = std::min<int>(test.size(), 1 + (insecure_randrange(2))); + int del = std::min<int>(test.size(), 1 + (insecure_randbool())); int beg = insecure_randrange(test.size() + 1 - del); test.erase(beg, beg + del); } @@ -224,19 +224,19 @@ BOOST_AUTO_TEST_CASE(PrevectorTestInt) } if (insecure_randbits(5) == 7) { int values[4]; - int num = 1 + (insecure_randrange(4)); + int num = 1 + (insecure_randbits(2)); for (int k = 0; k < num; k++) { values[k] = insecure_rand(); } test.insert_range(insecure_randrange(test.size() + 1), values, values + num); } if (insecure_randbits(5) == 8) { - int del = std::min<int>(test.size(), 1 + (insecure_randrange(4))); + int del = std::min<int>(test.size(), 1 + (insecure_randbits(2))); int beg = insecure_randrange(test.size() + 1 - del); test.erase(beg, beg + del); } if (insecure_randbits(5) == 9) { - test.reserve(insecure_randrange(32)); + test.reserve(insecure_randbits(5)); } if (insecure_randbits(6) == 10) { test.shrink_to_fit(); @@ -248,7 +248,7 @@ BOOST_AUTO_TEST_CASE(PrevectorTestInt) test.clear(); } if (insecure_randbits(9) == 12) { - test.assign(insecure_randrange(32), insecure_rand()); + test.assign(insecure_randbits(5), insecure_rand()); } if (insecure_randbits(3) == 3) { test.swap(); |