Assume nullptr existance

This commit is contained in:
Alexander Grund 2020-07-09 18:41:40 +02:00
parent cf330e8c86
commit f678f4d91f
No known key found for this signature in database
GPG key ID: AA48A0760367A42B
9 changed files with 7 additions and 65 deletions

View file

@ -350,8 +350,6 @@ BOOST_FIXTURE_TEST_CASE( triggering_an_expectation_with_failing_custom_constrain
// CHECK_CALLS( 1 );
//}
#ifdef MOCK_NULLPTR
BOOST_FIXTURE_TEST_CASE( nullptr_can_be_used_in_place_of_null_pointers_in_constraints, mock_error_fixture )
{
mock::detail::function< void( int* ) > f;
@ -360,8 +358,6 @@ BOOST_FIXTURE_TEST_CASE( nullptr_can_be_used_in_place_of_null_pointers_in_constr
CHECK_CALLS( 1 );
}
#endif
#ifdef MOCK_SMART_PTR
BOOST_FIXTURE_TEST_CASE( unique_ptr_is_supported_as_parameter, mock_error_fixture )

View file

@ -106,12 +106,10 @@ BOOST_AUTO_TEST_CASE( same_constraint )
BOOST_CHECK( ! c.c_( j ) );
BOOST_CHECK( c.c_( i ) );
}
#ifdef MOCK_NULLPTR
{
std::nullptr_t p;
BOOST_CHECK( mock::same( p ).c_( p ) );
}
#endif
}
BOOST_AUTO_TEST_CASE( assign_constraint )
@ -245,14 +243,12 @@ BOOST_AUTO_TEST_CASE( retrieve_constraint )
BOOST_CHECK( mock::retrieve( boost::ref( i ) ).c_( j ) );
BOOST_CHECK_EQUAL( i, &j );
}
#ifdef MOCK_NULLPTR
{
std::nullptr_t* i = 0;
std::nullptr_t j;
BOOST_CHECK( mock::retrieve( i ).c_( j ) );
BOOST_CHECK_EQUAL( i, &j );
}
#endif
#ifdef MOCK_SMART_PTR
{
std::unique_ptr< int > i;

View file

@ -665,15 +665,11 @@ BOOST_AUTO_TEST_CASE( boost_lambda_functor_yields_question_mark_when_serialized
#endif
#ifdef MOCK_NULLPTR
BOOST_AUTO_TEST_CASE( nullptr_is_serialized )
{
BOOST_CHECK_EQUAL( "nullptr", to_string( nullptr ) );
}
#endif
BOOST_AUTO_TEST_CASE( mock_boost_optional_yields_its_value_when_serialized )
{
BOOST_CHECK_EQUAL( "7", to_string( boost::optional< int >( 7 ) ) );