Skip to content

Commit

Permalink
Added another test for circular_q
Browse files Browse the repository at this point in the history
  • Loading branch information
gabime committed Aug 5, 2023
1 parent 1f8d360 commit 811bc4c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/test_circular_q.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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());
}

0 comments on commit 811bc4c

Please sign in to comment.