Added tests to ensure proper support for boost::result_of

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@552 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2012-09-02 21:30:45 +00:00
parent e38a3ee8ec
commit 8aa007af3b

View file

@ -13,6 +13,8 @@
#include <boost/test/auto_unit_test.hpp> #include <boost/test/auto_unit_test.hpp>
#define BOOST_LIB_NAME boost_unit_test_framework #define BOOST_LIB_NAME boost_unit_test_framework
#include <boost/config/auto_link.hpp> #include <boost/config/auto_link.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/function.hpp> #include <boost/function.hpp>
#include <boost/bind.hpp> #include <boost/bind.hpp>
@ -21,6 +23,15 @@
namespace namespace
{ {
boost::function< void() > static_f; boost::function< void() > static_f;
BOOST_MPL_ASSERT((
boost::is_same< void, boost::result_of< mock::detail::function< void() >() >::type > ));
BOOST_MPL_ASSERT((
boost::is_same< int, boost::result_of< mock::detail::function< int() >() >::type > ));
BOOST_MPL_ASSERT((
boost::is_same< void, boost::result_of< mock::detail::function< void( float ) >( float ) >::type > ));
BOOST_MPL_ASSERT((
boost::is_same< int, boost::result_of< mock::detail::function< int( float ) >( float ) >::type > ));
} }
// functor // functor