Commit 4a871b97 authored by gabime's avatar gabime

Added some mpmc_q tests

parent 057bf1b9
...@@ -93,13 +93,13 @@ TEST_CASE("full_queue", "[mpmc_blocking_q]") ...@@ -93,13 +93,13 @@ TEST_CASE("full_queue", "[mpmc_blocking_q]")
for(int i = 1; i < static_cast<int>(q_size); i++) for(int i = 1; i < static_cast<int>(q_size); i++)
{ {
int item; int item=-1;
q.dequeue_for(item, milliseconds(0)); q.dequeue_for(item, milliseconds(0));
REQUIRE(item == i); REQUIRE(item == i);
} }
// last item pushed has overridden the oldest. // last item pushed has overridden the oldest.
int item; int item=-1;
q.dequeue_for(item, milliseconds(0)); q.dequeue_for(item, milliseconds(0));
REQUIRE(item == 123456); REQUIRE(item == 123456);
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment