X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fstructure%2Fshared_ptr_test.cpp;h=877e1468e2b6aceec8717f8c7b3f6f61c50b5168;hb=f41b18f0649a50e179ba41383f4061e1878c4d4c;hp=d7b7364155f01447b29ca26ee5edc7269b353803;hpb=02ac1a43c12c821c92a2e416d0ec343dbe5784e7;p=simgear.git diff --git a/simgear/structure/shared_ptr_test.cpp b/simgear/structure/shared_ptr_test.cpp index d7b73641..877e1468 100644 --- a/simgear/structure/shared_ptr_test.cpp +++ b/simgear/structure/shared_ptr_test.cpp @@ -72,6 +72,9 @@ BOOST_AUTO_TEST_CASE( virtual_weak_ptr ) SGSharedPtr ptr1( weak_ptr.lock() ); BOOST_REQUIRE_EQUAL( ptr.getNumRefs(), 2 ); + // converting constructor + BOOST_REQUIRE_EQUAL( SGSharedPtr(weak_ptr), ptr1 ); + SGSharedPtr ptr2( weak_ptr.lock() ); BOOST_REQUIRE_EQUAL( ptr.getNumRefs(), 3 );