From 68a0990512df4721d69b630aafccfb3f53ca7b0e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 14 Jul 2024 14:24:43 +0200 Subject: w --- test/bptr.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test') diff --git a/test/bptr.cpp b/test/bptr.cpp index 12bd9442..13c8119e 100644 --- a/test/bptr.cpp +++ b/test/bptr.cpp @@ -337,6 +337,8 @@ void test9() void test10() { + static_assert(std::is_same_v, std::decay_t()} )>>); + fm_assert(bptr{} == bptr{}); fm_assert(bptr{} == bptr{}); fm_assert(bptr{} == bptr{}); @@ -349,8 +351,22 @@ void test10() auto p4 = bptr{InPlace, 4}; (void)p4; auto p5 = bptr{p4}; (void)p5; + //p4 = p5; fm_assert(p4->x == 4); fm_assert(p5->x == 4); fm_assert(p4 == p5); + p5 = p4; + fm_assert(p5->x == 4); + fm_assert(p4 == p5); + auto p6 = bptr{p5}; (void)p6; + //p4.swap(p5); + p5.swap(p6); + fm_assert(p5 == p6); + p6.destroy(); + fm_assert(!p6); + fm_assert(p5 == p6); + + (void)bptr{p6}; + //(void)bptr{p6}; } } // namespace -- cgit v1.2.3