Don't assert(...) with side effects
This commit is contained in:
1 parent
0df9b0aed2
commit
4c3c9c3869
1 file changed
+4
-2
@@ -138,11 +138,13 @@ BOOST_AUTO_TEST_CASE(singlethreadedscheduler_ordered)
|
|||||||
// the callbacks should run in exactly the order in which they were enqueued
|
// the callbacks should run in exactly the order in which they were enqueued
|
||||||
for (int i = 0; i < 100; ++i) {
|
for (int i = 0; i < 100; ++i) {
|
||||||
queue1.AddToProcessQueue([i, &counter1]() {
|
queue1.AddToProcessQueue([i, &counter1]() {
|
||||||
assert(i == counter1++);
|
bool expectation = i == counter1++;
|
||||||
|
assert(expectation);
|
||||||
});
|
});
|
||||||
|
|
||||||
queue2.AddToProcessQueue([i, &counter2]() {
|
queue2.AddToProcessQueue([i, &counter2]() {
|
||||||
assert(i == counter2++);
|
bool expectation = i == counter2++;
|
||||||
|
assert(expectation);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user