aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/kstd/kstd/ring_buffer.tests.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/kstd/kstd/ring_buffer.tests.cpp b/libs/kstd/kstd/ring_buffer.tests.cpp
index 889a0c36..58037e1c 100644
--- a/libs/kstd/kstd/ring_buffer.tests.cpp
+++ b/libs/kstd/kstd/ring_buffer.tests.cpp
@@ -1256,6 +1256,7 @@ SCENARIO("Ring Buffer modifiers", "[kstd][ring_buffer]")
WHEN("popping an element")
{
+ kstd::tests::static_copy_move_tracker::reset();
buffer.pop_front();
THEN("the size is 2")
@@ -1267,6 +1268,15 @@ SCENARIO("Ring Buffer modifiers", "[kstd][ring_buffer]")
{
REQUIRE_FALSE(buffer.empty());
}
+
+ THEN("there was one destructor call")
+ {
+ REQUIRE(kstd::tests::static_copy_move_tracker::dtor_call_count == 1);
+ REQUIRE(kstd::tests::static_copy_move_tracker::copy_ctor_call_count == 0);
+ REQUIRE(kstd::tests::static_copy_move_tracker::copy_assignment_call_count == 0);
+ REQUIRE(kstd::tests::static_copy_move_tracker::move_ctor_call_count == 0);
+ REQUIRE(kstd::tests::static_copy_move_tracker::move_assignment_call_count == 0);
+ }
}
WHEN("popping 3 elements")