More examples

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@14 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2009-08-30 22:33:13 +00:00
parent 9be6106311
commit 42d1e5add3

View file

@ -19,6 +19,24 @@
# pragma warning( disable : 4355 4505 ) # pragma warning( disable : 4355 4505 )
#endif #endif
namespace
{
struct my_custom_mock_object : mock::object
{
my_custom_mock_object()
: mock::object( "my_custom_mock_object" )
{}
MOCK_METHOD_EXT( my_method, 0, void(), my_method )
};
}
BOOST_AUTO_TEST_CASE( custom_mock_object_without_macros )
{
my_custom_mock_object mock;
MOCK_EXPECT( mock, my_method );
mock.my_method();
}
namespace namespace
{ {
MOCK_CLASS( my_mock ) MOCK_CLASS( my_mock )