Improve abi_test

This commit is contained in:
Peter Dimov
2018-12-23 00:06:13 +02:00
parent a314765b94
commit a095084492
2 changed files with 23 additions and 0 deletions
+11
View File
@@ -23,6 +23,7 @@ BOOST_PRAGMA_MESSAGE( "BOOST_NO_CXX11_HDR_ATOMIC is not defined" )
void abi_test_1( boost::shared_ptr<void> & p );
boost::shared_ptr<void> abi_test_2( boost::shared_ptr<void> const & p );
boost::shared_ptr<void> abi_test_3();
static int deleter_called;
@@ -67,5 +68,15 @@ int main()
BOOST_TEST_EQ( deleter_called, 1 );
}
{
boost::shared_ptr<void> p = abi_test_3();
BOOST_TEST_EQ( p.use_count(), 1 );
p.reset();
BOOST_TEST_EQ( p.use_count(), 0 );
}
return boost::report_errors();
}