From 044f0d8c1bfd9f1565f77d21d67aa1a5603a90e3 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 12 Sep 2024 01:42:14 +0200 Subject: d --- test/bptr.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/bptr.cpp') diff --git a/test/bptr.cpp b/test/bptr.cpp index 260b72b2..7e225a2d 100644 --- a/test/bptr.cpp +++ b/test/bptr.cpp @@ -377,10 +377,22 @@ void test11() auto p1 = bptr{new Foo{1}}; auto p2 = static_pointer_cast(p1); auto p3 = static_pointer_cast(p1); + fm_assert(p2->x == 1); fm_assert(p3); p1.destroy(); fm_assert(!p2); fm_assert(!p3); + + p1.destroy(); + p1.destroy(); + p1.destroy(); + p2.destroy(); + p2.destroy(); + p2.destroy(); + p3.destroy(); + p3.destroy(); + p3.destroy(); + fm_assert(!p1); fm_assert(!p2); fm_assert(!p3); } void test12() -- cgit v1.2.3