mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Added MOCK_NO_VARIADIC_MACROS to deactivate variadic macros support
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@668 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
8d08012cdf
commit
f97fb87f81
9 changed files with 58 additions and 36 deletions
|
|
@ -22,7 +22,8 @@
|
|||
namespace
|
||||
{
|
||||
struct declared_but_not_defined;
|
||||
BOOST_MPL_ASSERT_NOT(( mock::detail::is_functor< declared_but_not_defined, int > ));
|
||||
BOOST_MPL_ASSERT_NOT((
|
||||
mock::detail::is_functor< declared_but_not_defined, int > ));
|
||||
|
||||
template< typename T >
|
||||
void is_functor( T )
|
||||
|
|
@ -142,7 +143,11 @@ BOOST_AUTO_TEST_CASE( class_with_sig_is_functor )
|
|||
BOOST_AUTO_TEST_CASE( cxx11_lambda_is_functor )
|
||||
{
|
||||
is_not_functor( []() {} );
|
||||
#ifdef MOCK_DECLTYPE
|
||||
is_functor( []( int ) {} );
|
||||
#else
|
||||
is_not_functor( []( int ) {} );
|
||||
#endif
|
||||
is_not_functor( []( const std::string&, int ) {} );
|
||||
is_not_functor( []( int, const std::string& ) {} );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include <turtle/constraint.hpp>
|
||||
#include <boost/test/auto_unit_test.hpp>
|
||||
|
||||
#ifndef BOOST_NO_VARIADIC_MACROS
|
||||
#ifdef MOCK_VARIADIC_MACROS
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
@ -25,4 +25,4 @@ BOOST_AUTO_TEST_CASE( mock_constraint_is_supported_by_compilers_with_variadic_ma
|
|||
BOOST_CHECK( constraint_2( 0, 0 ).c_( 0 ) );
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_VARIADIC_MACROS
|
||||
#endif // MOCK_VARIADIC_MACROS
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ namespace
|
|||
MOCK_FUNCTION( fun0, 0, (std::map< int, int >()), fun0 )
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_VARIADIC_MACROS
|
||||
#ifdef MOCK_VARIADIC_MACROS
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
@ -390,4 +390,4 @@ namespace
|
|||
MOCK_FUNCTOR( f_variadic, std::map< int, int >() );
|
||||
}
|
||||
|
||||
#endif //BOOST_NO_VARIADIC_MACROS
|
||||
#endif //MOCK_VARIADIC_MACROS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue