diff --git a/tests/test_circular_q.cpp b/tests/test_circular_q.cpp index 59a5af92..fd91503a 100644 --- a/tests/test_circular_q.cpp +++ b/tests/test_circular_q.cpp @@ -4,7 +4,7 @@ using q_type = spdlog::details::circular_q; TEST_CASE("test_size", "[circular_q]") { - size_t q_size = 4; + const size_t q_size = 4; q_type q(q_size); REQUIRE(q.size() == 0); REQUIRE(q.empty() == true); @@ -46,3 +46,10 @@ TEST_CASE("test_rolling", "[circular_q]") q.push_back(6); REQUIRE(q.front() == 6); } + +TEST_CASE("test_empty", "[circular_q]") +{ + q_type q(0); + q.push_back(1); + REQUIRE(q.empty()); +} \ No newline at end of file