Added some mpmc_q tests

This commit is contained in:
gabime 2018-08-14 17:59:14 +03:00
parent 057bf1b92d
commit 4a871b9792

View File

@ -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);
} }