mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Remove MOCK_(CONST_)_METHOD_EXT detail macros
This commit is contained in:
parent
f6200f9024
commit
dd5f7552b3
2 changed files with 12 additions and 13 deletions
|
|
@ -80,9 +80,6 @@ namespace mock { namespace detail {
|
|||
MOCK_PP_TUPLE_FOR_EACH(MOCK_METHOD_ITER, (name, arity, signature, identifier), qualifiers) \
|
||||
MOCK_METHOD_HELPER(signature, identifier)
|
||||
|
||||
#define MOCK_CONST_METHOD_EXT(M, n, S, t) MOCK_METHOD_EXT(M, n, S, t, (const))
|
||||
#define MOCK_NON_CONST_METHOD_EXT(M, n, S, t) MOCK_METHOD_EXT(M, n, S, t, ())
|
||||
|
||||
#define MOCK_FUNCTION_HELPER(signature, identifier, prefix) \
|
||||
prefix mock::detail::function<signature>& identifier##_mock(mock::detail::context& context, \
|
||||
boost::unit_test::const_string instance) \
|
||||
|
|
|
|||
|
|
@ -87,19 +87,21 @@
|
|||
/// The 'signature' can be omitted if it can be uniquely identified from the base class
|
||||
/// if 'identifier' is omitted it will default to 'name'
|
||||
#define MOCK_CONST_METHOD(M, ...) \
|
||||
MOCK_CONST_METHOD_EXT(M, \
|
||||
MOCK_METHOD_EXT(M, \
|
||||
BOOST_PP_VARIADIC_ELEM(0, __VA_ARGS__, ), \
|
||||
BOOST_PP_VARIADIC_ELEM(1, __VA_ARGS__, MOCK_SIGNATURE(M), ), \
|
||||
BOOST_PP_VARIADIC_ELEM(2, __VA_ARGS__, M, M, ))
|
||||
BOOST_PP_VARIADIC_ELEM(2, __VA_ARGS__, M, M, ), \
|
||||
(const))
|
||||
/// MOCK_NON_CONST_METHOD( [calling convention] name, arity[, signature[, identifier]] )
|
||||
/// generates only the non-const version of the method
|
||||
/// The 'signature' can be omitted if it can be uniquely identified from the base class
|
||||
/// if 'identifier' is omitted it will default to 'name'
|
||||
#define MOCK_NON_CONST_METHOD(M, ...) \
|
||||
MOCK_NON_CONST_METHOD_EXT(M, \
|
||||
MOCK_METHOD_EXT(M, \
|
||||
BOOST_PP_VARIADIC_ELEM(0, __VA_ARGS__, ), \
|
||||
BOOST_PP_VARIADIC_ELEM(1, __VA_ARGS__, MOCK_SIGNATURE(M), ), \
|
||||
BOOST_PP_VARIADIC_ELEM(2, __VA_ARGS__, M, M, ))
|
||||
BOOST_PP_VARIADIC_ELEM(2, __VA_ARGS__, M, M, ), \
|
||||
())
|
||||
|
||||
/// MOCK_FUNCTION( [calling convention] name, arity, signature[, identifier] )
|
||||
/// if 'identifier' is omitted it will default to 'name'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue