Skip to content

Commit 737670c

Browse files
committed
Use assert when running from multithreaded code as BOOST_CHECK_* are not thread safe
1 parent 683838b commit 737670c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/scheduler_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ BOOST_AUTO_TEST_CASE(singlethreadedscheduler_ordered)
138138
// the callbacks should run in exactly the order in which they were enqueued
139139
for (int i = 0; i < 100; ++i) {
140140
queue1.AddToProcessQueue([i, &counter1]() {
141-
BOOST_CHECK_EQUAL(i, counter1++);
141+
assert(i == counter1++);
142142
});
143143

144144
queue2.AddToProcessQueue([i, &counter2]() {
145-
BOOST_CHECK_EQUAL(i, counter2++);
145+
assert(i == counter2++);
146146
});
147147
}
148148

0 commit comments

Comments
 (0)