diff --git a/include/turtle/config.hpp b/include/turtle/config.hpp index 744883f..bc8d096 100644 --- a/include/turtle/config.hpp +++ b/include/turtle/config.hpp @@ -40,12 +40,6 @@ # error BOOST_FT_MAX_ARITY must be set to MOCK_MAX_ARGS + 1 or higher #endif -#if !defined(BOOST_NO_CXX11_SMART_PTR) && !defined(BOOST_NO_SMART_PTR) -# ifndef MOCK_NO_SMART_PTR -# define MOCK_SMART_PTR -# endif -#endif - #if !defined(BOOST_NO_CXX11_HDR_FUNCTIONAL) # ifndef MOCK_NO_HDR_FUNCTIONAL # define MOCK_HDR_FUNCTIONAL diff --git a/include/turtle/detail/function.hpp b/include/turtle/detail/function.hpp index 24381da..693a506 100644 --- a/include/turtle/detail/function.hpp +++ b/include/turtle/detail/function.hpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/include/turtle/log.hpp b/include/turtle/log.hpp index e30ea55..691d5ef 100644 --- a/include/turtle/log.hpp +++ b/include/turtle/log.hpp @@ -144,7 +144,6 @@ namespace detail return s << boost::none; } -#ifdef MOCK_SMART_PTR template< typename T > stream& operator<<( stream& s, const std::shared_ptr< T >& t ) { @@ -160,7 +159,6 @@ namespace detail { return s << mock::format( p.get() ); } -#endif template< typename T > stream& operator<<( stream& s, const boost::lambda::lambda_functor< T >& ) diff --git a/test/detail/test_function.cpp b/test/detail/test_function.cpp index ad38a25..1a322d7 100644 --- a/test/detail/test_function.cpp +++ b/test/detail/test_function.cpp @@ -358,8 +358,6 @@ BOOST_FIXTURE_TEST_CASE( nullptr_can_be_used_in_place_of_null_pointers_in_constr CHECK_CALLS( 1 ); } -#ifdef MOCK_SMART_PTR - BOOST_FIXTURE_TEST_CASE( unique_ptr_is_supported_as_parameter, mock_error_fixture ) { mock::detail::function< void( std::unique_ptr< int > ) > f; @@ -369,8 +367,6 @@ BOOST_FIXTURE_TEST_CASE( unique_ptr_is_supported_as_parameter, mock_error_fixtur CHECK_CALLS( 1 ); } -#endif // MOCK_SMART_PTR - // result handling BOOST_FIXTURE_TEST_CASE( triggering_an_expectation_with_no_return_set_calls_missing_action, mock_error_fixture ) @@ -593,8 +589,6 @@ BOOST_FIXTURE_TEST_CASE( triggering_an_expectation_moves_the_set_rvalue, mock_er CHECK_CALLS( 1 ); } -#ifdef MOCK_SMART_PTR - BOOST_FIXTURE_TEST_CASE( triggering_an_expectation_moves_the_set_unique_ptr_lvalue, mock_error_fixture ) { mock::detail::function< std::unique_ptr< int >() > f; @@ -614,8 +608,6 @@ BOOST_FIXTURE_TEST_CASE( triggering_an_expectation_moves_the_set_unique_ptr_rval } } -#endif // MOCK_SMART_PTR - BOOST_FIXTURE_TEST_CASE( triggering_an_expectation_returns_the_set_shared_ptr_value, mock_error_fixture ) { { diff --git a/test/test_constraints.cpp b/test/test_constraints.cpp index 1d89740..008b117 100644 --- a/test/test_constraints.cpp +++ b/test/test_constraints.cpp @@ -52,7 +52,6 @@ BOOST_AUTO_TEST_CASE( equal_constraint ) s = "string"; BOOST_CHECK( c.c_( "string" ) ); } -#ifdef MOCK_SMART_PTR { std::unique_ptr< int > i; std::unique_ptr< int > j( new int( 3 ) ); @@ -61,7 +60,6 @@ BOOST_AUTO_TEST_CASE( equal_constraint ) BOOST_CHECK( mock::equal( i ).c_( i ) ); BOOST_CHECK( mock::equal( j ).c_( j ) ); } -#endif } BOOST_AUTO_TEST_CASE( equal_constraint_deref ) @@ -75,14 +73,12 @@ BOOST_AUTO_TEST_CASE( equal_constraint_deref ) int* i = 0; BOOST_CHECK( ! mock::equal( 3 ).c_( i ) ); } -#ifdef MOCK_SMART_PTR { std::unique_ptr< int > j( new int( 3 ) ); BOOST_CHECK( mock::equal( 3 ).c_( j ) ); std::unique_ptr< int > i; BOOST_CHECK( ! mock::equal( 3 ).c_( i ) ); } -#endif // MOCK_SMART_PTR } BOOST_AUTO_TEST_CASE( same_constraint ) @@ -249,7 +245,6 @@ BOOST_AUTO_TEST_CASE( retrieve_constraint ) BOOST_CHECK( mock::retrieve( i ).c_( j ) ); BOOST_CHECK_EQUAL( i, &j ); } -#ifdef MOCK_SMART_PTR { std::unique_ptr< int > i; std::unique_ptr< int > j( new int( 3 ) ); @@ -258,7 +253,6 @@ BOOST_AUTO_TEST_CASE( retrieve_constraint ) BOOST_CHECK_EQUAL( 3, *i ); BOOST_CHECK( !j ); } -#endif } namespace @@ -291,12 +285,10 @@ BOOST_AUTO_TEST_CASE( affirm_constraint ) BOOST_CHECK( mock::affirm.c_( &j ) ); } { -#ifdef MOCK_SMART_PTR std::unique_ptr< int > i; std::unique_ptr< int > j( new int( 3 ) ); BOOST_CHECK( ! mock::affirm.c_( i ) ); BOOST_CHECK( mock::affirm.c_( j ) ); -#endif } } diff --git a/test/test_integration.cpp b/test/test_integration.cpp index 8cc3557..587984e 100644 --- a/test/test_integration.cpp +++ b/test/test_integration.cpp @@ -705,8 +705,6 @@ BOOST_FIXTURE_TEST_CASE( mock_method_accepts_polymorphic_multi_constraint, mock_ CHECK_CALLS( 1 ); } -#ifdef MOCK_SMART_PTR - BOOST_FIXTURE_TEST_CASE( std_unique_ptr_argument_is_supported_in_action, mock_error_fixture ) { MOCK_FUNCTOR( f, void( std::unique_ptr< int > ) ); @@ -775,5 +773,3 @@ struct my_unique_ptr_class MOCK_METHOD_EXT( m, 1, void( std::unique_ptr< int > ), m ) MOCK_STATIC_METHOD( ms, 1, void( std::unique_ptr< int > ), ms ) }; - -#endif diff --git a/test/test_log.cpp b/test/test_log.cpp index 59d5b4c..b624734 100644 --- a/test/test_log.cpp +++ b/test/test_log.cpp @@ -409,8 +409,6 @@ 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 >() ) ); @@ -429,8 +427,6 @@ BOOST_AUTO_TEST_CASE( std_unique_ptr_are_serialized ) 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;