From 811bc4c7a9a4b192c6fa59109476e214f0eb50c0 Mon Sep 17 00:00:00 2001 From: gabime Date: Sat, 5 Aug 2023 17:26:16 +0300 Subject: [PATCH] Added another test for circular_q --- tests/test_circular_q.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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