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

@ -15,7 +15,7 @@ namespace
template< typename T >
std::string to_string( const T& )
{
return boost::lexical_cast< std::string >( mock::detail::type_name( BOOST_SP_TYPEID( T ) ) );
return boost::lexical_cast< std::string >( MOCK_TYPE_NAME(T) );
}
}
@ -111,7 +111,7 @@ BOOST_AUTO_TEST_CASE( name_of_type_in_unnamed_inner_namespace_is_extracted )
BOOST_AUTO_TEST_CASE( name_of_local_type_is_extracted )
{
struct my_local_type {};
BOOST_CHECK_EQUAL( "my_local_type", boost::lexical_cast< std::string >( mock::detail::type_name( BOOST_SP_TYPEID( my_local_type ) ) ) );
BOOST_CHECK_EQUAL( "my_local_type", boost::lexical_cast< std::string >( MOCK_TYPE_NAME(my_local_type) ) );
}
namespace