Skip to content

Commit

Permalink
d
Browse files Browse the repository at this point in the history
  • Loading branch information
sthalik committed Sep 20, 2024
1 parent 1a972e7 commit 044f0d8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/bptr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 044f0d8

Please sign in to comment.