mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Removed alternate experimental macros
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@334 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
10eed34ad7
commit
9336d101ec
3 changed files with 4 additions and 144 deletions
|
|
@ -266,78 +266,3 @@ BOOST_MPL_ASSERT(( boost::is_same< mock::detail::invalid_type, mock::detail::arg
|
|||
BOOST_MPL_ASSERT(( boost::is_same< mock::detail::invalid_type, mock::detail::arg< void( float, int ), 1, 1 >::type > ));
|
||||
BOOST_MPL_ASSERT(( boost::is_same< mock::detail::invalid_type, mock::detail::arg< void( float, int ), 1, 3 >::type > ));
|
||||
BOOST_MPL_ASSERT(( boost::is_same< mock::detail::invalid_type, mock::detail::arg< void( float, int ), 2, 3 >::type > ));
|
||||
|
||||
BOOST_AUTO_TEST_CASE( call_selects_proper_form )
|
||||
{
|
||||
{
|
||||
mock::function< void() > e;
|
||||
e.expect().once();
|
||||
mock::detail::call( e );
|
||||
}
|
||||
{
|
||||
mock::function< void( int ) > e;
|
||||
e.expect().once();
|
||||
mock::detail::call( e, 3 );
|
||||
}
|
||||
{
|
||||
mock::function< int() > e;
|
||||
e.expect().once().returns( 0 );
|
||||
mock::detail::call( e );
|
||||
}
|
||||
{
|
||||
mock::function< int( int ) > e;
|
||||
e.expect().once().returns( 0 );
|
||||
mock::detail::call( e, 3 );
|
||||
}
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
struct mock_class_0
|
||||
{
|
||||
MOCK_METHOD_EXT_ALT( method, void(), method )
|
||||
};
|
||||
struct mock_class_1
|
||||
{
|
||||
MOCK_METHOD_EXT_ALT( method, void( float ), method )
|
||||
};
|
||||
|
||||
struct mock_class_r0
|
||||
{
|
||||
MOCK_METHOD_EXT_ALT( method, int(), method )
|
||||
};
|
||||
struct mock_class_r1
|
||||
{
|
||||
MOCK_METHOD_EXT_ALT( method, int( float ), method )
|
||||
};
|
||||
|
||||
struct forward_declared_only;
|
||||
struct defined_but_non_copiable : private boost::noncopyable
|
||||
{
|
||||
};
|
||||
struct base_class
|
||||
{
|
||||
virtual ~base_class() {}
|
||||
virtual void some_method( int, float&, const std::string& ) = 0;
|
||||
virtual void some_other_method() = 0;
|
||||
virtual int another_method() = 0;
|
||||
virtual void yet_another_method( forward_declared_only& ) = 0;
|
||||
virtual void yet_again_some_other_method( defined_but_non_copiable& ) = 0;
|
||||
};
|
||||
MOCK_BASE_CLASS( mock_base_class, base_class )
|
||||
{
|
||||
MOCK_METHOD_ALT( some_method )
|
||||
MOCK_METHOD_ALT( some_other_method )
|
||||
MOCK_METHOD_ALT( another_method )
|
||||
MOCK_METHOD_ALT( yet_another_method )
|
||||
MOCK_METHOD_ALT( yet_again_some_other_method )
|
||||
};
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( experimental_macros_slow_as_hell_to_compile )
|
||||
{
|
||||
mock_base_class c;
|
||||
MOCK_EXPECT( c, some_method ).once();
|
||||
float f = 4.f;
|
||||
c.some_method( 3, f, "" );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue