Merged functions branch back to trunk

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@401 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2012-01-14 16:12:29 +00:00
parent c0bc085943
commit 40cf39aae7
15 changed files with 211 additions and 124 deletions

View file

@ -25,13 +25,13 @@ namespace
BOOST_AUTO_TEST_CASE( call_mock_method_with_max_number_of_args )
{
my_custom_mock m;
MOCK_EXPECT( m, method ).once().with( BOOST_PP_ENUM(MOCK_MAX_ARGS, IDENTITY, 0) );
MOCK_EXPECT( m.method ).once().with( BOOST_PP_ENUM(MOCK_MAX_ARGS, IDENTITY, 0) );
m.method( BOOST_PP_ENUM(MOCK_MAX_ARGS, IDENTITY, 0) );
}
BOOST_AUTO_TEST_CASE( call_mock_method_with_max_number_of_args_and_returning_something )
{
my_custom_mock m;
MOCK_EXPECT( m, method2 ).once().with( BOOST_PP_ENUM(MOCK_MAX_ARGS, IDENTITY, 0) ).returns( 42 );
MOCK_EXPECT( m.method2 ).once().with( BOOST_PP_ENUM(MOCK_MAX_ARGS, IDENTITY, 0) ).returns( 42 );
BOOST_CHECK_EQUAL( 42, m.method2( BOOST_PP_ENUM(MOCK_MAX_ARGS, IDENTITY, 0) ) );
}