Changeset View
Changeset View
Standalone View
Standalone View
src/test/prevector_tests.cpp
Show First 20 Lines • Show All 176 Lines • ▼ Show 20 Lines | public: | ||||
} | } | ||||
~prevector_tester() { | ~prevector_tester() { | ||||
BOOST_CHECK_MESSAGE(passed, "insecure_rand: " + rand_seed.ToString()); | BOOST_CHECK_MESSAGE(passed, "insecure_rand: " + rand_seed.ToString()); | ||||
} | } | ||||
prevector_tester() { | prevector_tester() { | ||||
SeedInsecureRand(); | SeedInsecureRand(); | ||||
rand_seed = insecure_rand_seed; | rand_seed = InsecureRand256(); | ||||
rand_cache = insecure_rand_ctx; | rand_cache = FastRandomContext(rand_seed); | ||||
} | } | ||||
}; | }; | ||||
BOOST_AUTO_TEST_CASE(PrevectorTestInt) { | BOOST_AUTO_TEST_CASE(PrevectorTestInt) { | ||||
for (int j = 0; j < 64; j++) { | for (int j = 0; j < 64; j++) { | ||||
prevector_tester<8, int> test; | prevector_tester<8, int> test; | ||||
for (int i = 0; i < 2048; i++) { | for (int i = 0; i < 2048; i++) { | ||||
if (InsecureRandBits(2) == 0) { | if (InsecureRandBits(2) == 0) { | ||||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |