diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-09-12 01:42:14 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-09-20 16:08:48 +0200 |
commit | 044f0d8c1bfd9f1565f77d21d67aa1a5603a90e3 (patch) | |
tree | e57583aab118405ed81f928356eed977d6754171 | |
parent | 1a972e7db2d4a1fbd78344c2bcb53e0b5183a15c (diff) |
d
-rw-r--r-- | test/bptr.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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<bptr_base>{new Foo{1}}; auto p2 = static_pointer_cast<Foo>(p1); auto p3 = static_pointer_cast<bptr_base>(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() |