Changeset View
Changeset View
Standalone View
Standalone View
src/test/checkqueue_tests.cpp
Show First 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | for (const size_t i : range) { | ||||
while (total) { | while (total) { | ||||
vChecks.resize(std::min(total, (size_t)InsecureRandRange(10))); | vChecks.resize(std::min(total, (size_t)InsecureRandRange(10))); | ||||
total -= vChecks.size(); | total -= vChecks.size(); | ||||
control.Add(vChecks); | control.Add(vChecks); | ||||
} | } | ||||
BOOST_REQUIRE(control.Wait()); | BOOST_REQUIRE(control.Wait()); | ||||
if (FakeCheckCheckCompletion::n_calls != i) { | if (FakeCheckCheckCompletion::n_calls != i) { | ||||
BOOST_REQUIRE_EQUAL(FakeCheckCheckCompletion::n_calls, i); | BOOST_REQUIRE_EQUAL(FakeCheckCheckCompletion::n_calls, i); | ||||
BOOST_TEST_MESSAGE("Failure on trial " | |||||
<< i << " expected, got " | |||||
<< FakeCheckCheckCompletion::n_calls); | |||||
} | } | ||||
} | } | ||||
tg.interrupt_all(); | tg.interrupt_all(); | ||||
tg.join_all(); | tg.join_all(); | ||||
} | } | ||||
/** Test that 0 checks is correct | /** Test that 0 checks is correct | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 263 Lines • Show Last 20 Lines |