Use assert when running from multithreaded code as BOOST_CHECK_* are not thread safe

Github-Pull: #14069
Rebased-From: 737670c036
This commit is contained in:
Jesse Cohen 2018-08-26 09:41:57 -04:00 committed by MarcoFalke
parent fab0fbefcf
commit cf3d7f94c2

View file

@ -138,11 +138,11 @@ BOOST_AUTO_TEST_CASE(singlethreadedscheduler_ordered)
// the callbacks should run in exactly the order in which they were enqueued
for (int i = 0; i < 100; ++i) {
queue1.AddToProcessQueue([i, &counter1]() {
BOOST_CHECK_EQUAL(i, counter1++);
assert(i == counter1++);
});
queue2.AddToProcessQueue([i, &counter2]() {
BOOST_CHECK_EQUAL(i, counter2++);
assert(i == counter2++);
});
}