Skip to content

Commit

Permalink
Use assert when running from multithreaded code as BOOST_CHECK_* are …
Browse files Browse the repository at this point in the history
…not thread safe
  • Loading branch information
skeees committed Aug 26, 2018
1 parent 683838b commit 737670c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/scheduler_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++);
});
}

Expand Down

0 comments on commit 737670c

Please sign in to comment.