diff --git a/tests/test_mpmc_q.cpp b/tests/test_mpmc_q.cpp index 37f0be44..105445e7 100644 --- a/tests/test_mpmc_q.cpp +++ b/tests/test_mpmc_q.cpp @@ -93,13 +93,13 @@ TEST_CASE("full_queue", "[mpmc_blocking_q]") for(int i = 1; i < static_cast(q_size); i++) { - int item; + int item=-1; q.dequeue_for(item, milliseconds(0)); REQUIRE(item == i); } - + // last item pushed has overridden the oldest. - int item; + int item=-1; q.dequeue_for(item, milliseconds(0)); REQUIRE(item == 123456); } \ No newline at end of file