|
|
@ -169,6 +169,19 @@ public: |
|
|
|
pre_vector.swap(pre_vector_alt); |
|
|
|
pre_vector.swap(pre_vector_alt); |
|
|
|
test(); |
|
|
|
test(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void move() { |
|
|
|
|
|
|
|
real_vector = std::move(real_vector_alt); |
|
|
|
|
|
|
|
real_vector_alt.clear(); |
|
|
|
|
|
|
|
pre_vector = std::move(pre_vector_alt); |
|
|
|
|
|
|
|
pre_vector_alt.clear(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void copy() { |
|
|
|
|
|
|
|
real_vector = real_vector_alt; |
|
|
|
|
|
|
|
pre_vector = pre_vector_alt; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
~prevector_tester() { |
|
|
|
~prevector_tester() { |
|
|
|
BOOST_CHECK_MESSAGE(passed, "insecure_rand_Rz: " |
|
|
|
BOOST_CHECK_MESSAGE(passed, "insecure_rand_Rz: " |
|
|
|
<< rand_cache.Rz |
|
|
|
<< rand_cache.Rz |
|
|
@ -240,9 +253,15 @@ BOOST_AUTO_TEST_CASE(PrevectorTestInt) |
|
|
|
if (((r >> 21) % 512) == 12) { |
|
|
|
if (((r >> 21) % 512) == 12) { |
|
|
|
test.assign(insecure_rand() % 32, insecure_rand()); |
|
|
|
test.assign(insecure_rand() % 32, insecure_rand()); |
|
|
|
} |
|
|
|
} |
|
|
|
if (((r >> 15) % 64) == 3) { |
|
|
|
if (((r >> 15) % 8) == 3) { |
|
|
|
test.swap(); |
|
|
|
test.swap(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (((r >> 15) % 16) == 8) { |
|
|
|
|
|
|
|
test.copy(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (((r >> 15) % 32) == 18) { |
|
|
|
|
|
|
|
test.move(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|