|
|
@ -209,10 +209,10 @@ BOOST_AUTO_TEST_CASE(PrevectorTestInt)
|
|
|
|
test.resize(new_size);
|
|
|
|
test.resize(new_size);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (insecure_randbits(3) == 3) {
|
|
|
|
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) {
|
|
|
|
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);
|
|
|
|
int beg = insecure_randrange(test.size() + 1 - del);
|
|
|
|
test.erase(beg, beg + del);
|
|
|
|
test.erase(beg, beg + del);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -224,19 +224,19 @@ BOOST_AUTO_TEST_CASE(PrevectorTestInt)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (insecure_randbits(5) == 7) {
|
|
|
|
if (insecure_randbits(5) == 7) {
|
|
|
|
int values[4];
|
|
|
|
int values[4];
|
|
|
|
int num = 1 + (insecure_randrange(4));
|
|
|
|
int num = 1 + (insecure_randbits(2));
|
|
|
|
for (int k = 0; k < num; k++) {
|
|
|
|
for (int k = 0; k < num; k++) {
|
|
|
|
values[k] = insecure_rand();
|
|
|
|
values[k] = insecure_rand();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
test.insert_range(insecure_randrange(test.size() + 1), values, values + num);
|
|
|
|
test.insert_range(insecure_randrange(test.size() + 1), values, values + num);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (insecure_randbits(5) == 8) {
|
|
|
|
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);
|
|
|
|
int beg = insecure_randrange(test.size() + 1 - del);
|
|
|
|
test.erase(beg, beg + del);
|
|
|
|
test.erase(beg, beg + del);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (insecure_randbits(5) == 9) {
|
|
|
|
if (insecure_randbits(5) == 9) {
|
|
|
|
test.reserve(insecure_randrange(32));
|
|
|
|
test.reserve(insecure_randbits(5));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (insecure_randbits(6) == 10) {
|
|
|
|
if (insecure_randbits(6) == 10) {
|
|
|
|
test.shrink_to_fit();
|
|
|
|
test.shrink_to_fit();
|
|
|
@ -248,7 +248,7 @@ BOOST_AUTO_TEST_CASE(PrevectorTestInt)
|
|
|
|
test.clear();
|
|
|
|
test.clear();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (insecure_randbits(9) == 12) {
|
|
|
|
if (insecure_randbits(9) == 12) {
|
|
|
|
test.assign(insecure_randrange(32), insecure_rand());
|
|
|
|
test.assign(insecure_randbits(5), insecure_rand());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (insecure_randbits(3) == 3) {
|
|
|
|
if (insecure_randbits(3) == 3) {
|
|
|
|
test.swap();
|
|
|
|
test.swap();
|
|
|
|