Rename MOCK_PROTECT_FUNCTION_SIG to MOCK_PROTECT_SIGNATURE

Shorter and avoids the abbreviation
This commit is contained in:
Alexander Grund 2022-01-25 18:05:06 +01:00
parent 95ec79f8f1
commit df10c59d21
No known key found for this signature in database
GPG key ID: AA48A0760367A42B
5 changed files with 13 additions and 13 deletions

View file

@ -19,9 +19,9 @@
#include <type_traits>
namespace mock { namespace detail {
/// Used in MOCK_PROTECT_FUNCTION_SIG to unwrap the passed function signature
/// Used in MOCK_PROTECT_SIGNATURE to unwrap the passed function signature
template<typename T>
using unwrap_function_sig_t = std::remove_pointer_t<parameter_type_t<T>>;
using unwrap_signature_t = std::remove_pointer_t<parameter_type_t<T>>;
}} // namespace mock::detail
#define MOCK_HELPER(t) t##_mock(mock::detail::root, BOOST_PP_STRINGIZE(t))

View file

@ -24,9 +24,9 @@
/// Define a class deriving from a base class
#define MOCK_BASE_CLASS(name, ...) struct name : __VA_ARGS__, mock::object, mock::detail::base<__VA_ARGS__>
/// MOCK_PROTECT_FUNCTION_SIG( signature )
/// MOCK_PROTECT_SIGNATURE( signature )
/// Use this with MOCK_FUNCTION/MOCK_*_METHOD if the return type contains commas
#define MOCK_PROTECT_FUNCTION_SIG(...) mock::detail::unwrap_function_sig_t<void(__VA_ARGS__)>
#define MOCK_PROTECT_SIGNATURE(...) mock::detail::unwrap_signature_t<void(__VA_ARGS__)>
/// MOCK_FUNCTOR( name, signature )
/// Define a callable variable/member