mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 08:25:43 +08:00
Added another test for circular_q
This commit is contained in:
parent
1f8d36071e
commit
811bc4c7a9
@ -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());
|
||||
}
|
Loading…
Reference in New Issue
Block a user