Added move support in actions

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@681 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2013-08-13 21:43:14 +00:00
parent fc74b61817
commit 392240a87c
7 changed files with 126 additions and 18 deletions

View file

@ -624,6 +624,7 @@ BOOST_AUTO_TEST_CASE( demonstrates_configuring_actions )
{
mock_class c;
MOCK_EXPECT( c.method ).returns( 42 );
MOCK_EXPECT( c.method ).moves( 42 ); // returns by moving the value
MOCK_EXPECT( c.method ).throws( std::runtime_error( "error !" ) );
MOCK_EXPECT( c.method ).calls( &function ); // forwards 'method' parameter to 'function'
MOCK_EXPECT( c.method ).calls( boost::bind( &function, 42 ) ); // drops 'method' parameter and binds 42 as parameter to 'function'