Added MOCK_FUNCTOR_TPL

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@608 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2013-03-08 20:40:00 +00:00
parent 3f9e9a78a7
commit 200e293b7f
4 changed files with 42 additions and 5 deletions

View file

@ -342,6 +342,8 @@ Example :
Synopsis :
MOCK_FUNCTOR( name, signature );
MOCK_FUNCTOR_TPL( name, signature ); // must be used if the signature uses a template parameter
Example :
@ -350,6 +352,23 @@ Example :
MOCK_FUNCTOR( f, void( int ) );
}
Example :
namespace
{
template< typename T >
struct template_class
{
MOCK_FUNCTOR_TPL( f, void( T ) );
};
}
BOOST_AUTO_TEST_CASE( demonstrates_instantiating_a_mock_template_functor )
{
template_class< int > c;
c.f( 3 );
}
[endsect]
[section Function]