Refactoring

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@318 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2011-05-11 13:47:36 +00:00
parent f4127636d5
commit b9f50e0c4f
2 changed files with 29 additions and 53 deletions

View file

@ -16,38 +16,22 @@
namespace
{
void f1();
int f2( float );
BOOST_MPL_ASSERT(( boost::is_same< mock::function< void() >,
mock::function< BOOST_TYPEOF( f1 ) > > ));
BOOST_MPL_ASSERT(( boost::is_same< mock::function< int( float ) >,
mock::function< BOOST_TYPEOF( f2 ) > > ));
struct example
struct s
{
void method1();
float method2( int );
void m1();
float m2( int );
};
BOOST_STATIC_ASSERT(
(boost::is_same<
mock::function< void() >,
mock::function<
mock::detail::signature<
BOOST_TYPEOF( &example::method1 )
>::type
>
>::value) );
BOOST_STATIC_ASSERT(
(boost::is_same<
mock::function< float( int ) >,
mock::function<
mock::detail::signature<
BOOST_TYPEOF( &example::method2 )
>::type
>
>::value) );
BOOST_MPL_ASSERT((
boost::is_same<
void(),
mock::detail::signature< BOOST_TYPEOF( &s::m1 ) >::type
> ));
BOOST_MPL_ASSERT((
boost::is_same<
float( int ),
mock::detail::signature< BOOST_TYPEOF( &s::m2 ) >::type
> ));
}
BOOST_AUTO_TEST_CASE( ptr_uniformizes_reference_and_pointer )