From b47f6164b82c166afb6d560caa3ffb79db15c7b7 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 14 Jul 2024 16:03:57 +0200 Subject: w --- test/bptr.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/bptr.cpp b/test/bptr.cpp index 13c8119e..ffff5b19 100644 --- a/test/bptr.cpp +++ b/test/bptr.cpp @@ -365,8 +365,17 @@ void test10() fm_assert(!p6); fm_assert(p5 == p6); - (void)bptr{p6}; - //(void)bptr{p6}; + fm_assert(!bptr{p6}); + //fm_assert(bptr{p6}); +} + +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); } } // namespace @@ -383,6 +392,7 @@ void Test::test_bptr() test8(); test9(); test10(); + test11(); } } // namespace floormat -- cgit v1.2.3