Added support for dereferencing in mock::equal

This commit is contained in:
Mathieu Champlon 2018-01-17 10:31:53 +01:00
parent a2d36e961a
commit 5d11db0f52
10 changed files with 117 additions and 12 deletions

View file

@ -705,4 +705,20 @@ BOOST_FIXTURE_TEST_CASE( std_unique_ptr_argument_is_supported_in_action, mock_er
CHECK_CALLS( 1 );
}
BOOST_FIXTURE_TEST_CASE( std_unique_ptr_argument_is_supported_in_equal_constraint, mock_error_fixture )
{
{
MOCK_FUNCTOR( f, void( std::unique_ptr< int > ) );
MOCK_EXPECT( f ).once().with( mock::equal( 7 ) );
f( std::unique_ptr< int >( new int( 7 ) ) );
CHECK_CALLS( 1 );
}
{
MOCK_FUNCTOR( f, void( std::unique_ptr< int > ) );
MOCK_EXPECT( f ).once().with( 7 );
f( std::unique_ptr< int >( new int( 7 ) ) );
CHECK_CALLS( 1 );
}
}
#endif