Factorized MOCK_TYPE_NAME

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@725 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2014-04-26 07:06:58 +00:00
parent 30dadf0c61
commit cbb4683dde
4 changed files with 8 additions and 6 deletions

View file

@ -24,6 +24,8 @@
#include <cstdlib>
#endif
#define MOCK_TYPE_NAME( T ) mock::detail::type_name( BOOST_SP_TYPEID(T) )
namespace mock
{
namespace detail

View file

@ -67,7 +67,7 @@
{ \
mock::detail::configure( *this, t##_mock_, \
instance.substr( 0, instance.rfind( BOOST_PP_STRINGIZE(t) ) ), \
mock::detail::type_name( BOOST_SP_TYPEID(*this) ), \
MOCK_TYPE_NAME(*this), \
BOOST_PP_STRINGIZE(t) ); \
return t##_mock_; \
}