Added another test for circular_q

This commit is contained in:
gabime 2023-08-05 17:26:16 +03:00
parent 1f8d36071e
commit 811bc4c7a9

View File

@ -4,7 +4,7 @@
using q_type = spdlog::details::circular_q<size_t>;
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());
}