mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Fixed move-only type argument in actions
Because boost::function does not move the parameters it receives we need to use std::function instead.
This commit is contained in:
parent
58b5e55bb5
commit
d3a5d3010c
8 changed files with 40 additions and 22 deletions
|
|
@ -690,3 +690,19 @@ BOOST_FIXTURE_TEST_CASE( mock_method_accepts_polymorphic_multi_constraint, mock_
|
|||
m.m2( 1, 2 );
|
||||
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 > ) );
|
||||
std::unique_ptr< int > p;
|
||||
MOCK_EXPECT( f ).once().calls(
|
||||
[]( std::unique_ptr< int > )
|
||||
{
|
||||
} );
|
||||
f( std::unique_ptr< int >( new int( 7 ) ) );
|
||||
CHECK_CALLS( 1 );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue