mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Added logging support for std::unique_ptr, std::shared_ptr and std::weak_ptr
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@677 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
068f73b0bc
commit
808af17eb8
3 changed files with 43 additions and 0 deletions
|
|
@ -402,6 +402,28 @@ BOOST_AUTO_TEST_CASE( boost_weak_ptr_are_serialized )
|
|||
BOOST_CHECK_NE( "?", to_string( boost::weak_ptr< int >( boost::shared_ptr< int >( new int( 42 ) ) ) ) );
|
||||
}
|
||||
|
||||
#ifdef MOCK_SMART_PTR
|
||||
|
||||
BOOST_AUTO_TEST_CASE( std_shared_ptr_are_serialized )
|
||||
{
|
||||
BOOST_CHECK_NE( "?", to_string( std::shared_ptr< int >() ) );
|
||||
BOOST_CHECK_NE( "?", to_string( std::shared_ptr< int >( new int( 42 ) ) ) );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( std_weak_ptr_are_serialized )
|
||||
{
|
||||
BOOST_CHECK_NE( "?", to_string( std::weak_ptr< int >( std::shared_ptr< int >() ) ) );
|
||||
BOOST_CHECK_NE( "?", to_string( std::weak_ptr< int >( std::shared_ptr< int >( new int( 42 ) ) ) ) );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( std_unique_ptr_are_serialized )
|
||||
{
|
||||
BOOST_CHECK_NE( "?", to_string( std::unique_ptr< int >() ) );
|
||||
BOOST_CHECK_NE( "?", to_string( std::unique_ptr< int >( new int( 42 ) ) ) );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
BOOST_AUTO_TEST_CASE( std_deques_are_serialized )
|
||||
{
|
||||
std::deque< int > d;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue