diff options
Diffstat (limited to 'test/bptr.cpp')
| -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() |
