Simplified details::circular_q by removing iterator support and updated tests

This commit is contained in:
gabime
2023-09-01 14:05:02 +03:00
parent aacea38f9d
commit a8b74096b2
2 changed files with 5 additions and 80 deletions

View File

@@ -12,7 +12,7 @@ TEST_CASE("test_size", "[circular_q]")
REQUIRE(q.full() == false);
for (size_t i = 0; i < q_size; i++)
{
q.push_back(std::move(i));
q.push_back(10);
}
REQUIRE(q.size() == q_size);
q.push_back(999);
@@ -26,7 +26,7 @@ TEST_CASE("test_rolling", "[circular_q]")
for (size_t i = 0; i < q_size + 2; i++)
{
q.push_back(std::move(i));
q.push_back(size_t{i}); // arg to push_back must be r value
}
REQUIRE(q.size() == q_size);