diff options
| author | practicalswift <[email protected]> | 2018-08-28 10:19:18 +0200 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2018-08-28 10:22:28 +0200 |
| commit | 4c3c9c38699360f93d3c52a01a90ff15ee5e1a62 (patch) | |
| tree | ac87cf34c94b507f106ef07520986ea1747dcd20 /src/test/scheduler_tests.cpp | |
| parent | Merge #14042: travis: add CXXFLAGS=-Wno-psabi at ARM job (diff) | |
| download | discoin-4c3c9c38699360f93d3c52a01a90ff15ee5e1a62.tar.xz discoin-4c3c9c38699360f93d3c52a01a90ff15ee5e1a62.zip | |
Don't assert(...) with side effects
Diffstat (limited to 'src/test/scheduler_tests.cpp')
| -rw-r--r-- | src/test/scheduler_tests.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/scheduler_tests.cpp b/src/test/scheduler_tests.cpp index 2af0ab22d..3c63ad736 100644 --- a/src/test/scheduler_tests.cpp +++ b/src/test/scheduler_tests.cpp @@ -138,11 +138,13 @@ 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]() { - assert(i == counter1++); + bool expectation = i == counter1++; + assert(expectation); }); queue2.AddToProcessQueue([i, &counter2]() { - assert(i == counter2++); + bool expectation = i == counter2++; + assert(expectation); }); } |