mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Added a macro to help mocking a destructor
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@66 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
6354375b7e
commit
51379e7844
2 changed files with 18 additions and 0 deletions
|
|
@ -202,3 +202,17 @@ BOOST_AUTO_TEST_CASE( mock_functor_with_tag_has_no_effect )
|
|||
f.tag( "my functor" );
|
||||
BOOST_CHECK_EQUAL( "f", to_string( MOCK_MOCKER( f, _ ) ) );
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
MOCK_CLASS( my_destroyed_class )
|
||||
{
|
||||
MOCK_DESTRUCTOR( my_destroyed_class, destructor )
|
||||
};
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( mocking_a_destructor )
|
||||
{
|
||||
my_destroyed_class c;
|
||||
MOCK_EXPECT( c, destructor ).once();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue