summaryrefslogtreecommitdiff
path: root/include/gmock/gmock-generated-function-mockers.h.pump
diff options
context:
space:
mode:
Diffstat (limited to 'include/gmock/gmock-generated-function-mockers.h.pump')
-rw-r--r--include/gmock/gmock-generated-function-mockers.h.pump44
1 files changed, 23 insertions, 21 deletions
diff --git a/include/gmock/gmock-generated-function-mockers.h.pump b/include/gmock/gmock-generated-function-mockers.h.pump
index 4f7fdc1..a9abc97 100644
--- a/include/gmock/gmock-generated-function-mockers.h.pump
+++ b/include/gmock/gmock-generated-function-mockers.h.pump
@@ -106,92 +106,94 @@ using internal::FunctionMocker;
// The result type of function type F.
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_RESULT(tn, F) tn ::testing::internal::Function<F>::Result
+#define GMOCK_RESULT_(tn, F) tn ::testing::internal::Function<F>::Result
// The type of argument N of function type F.
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_ARG(tn, F, N) tn ::testing::internal::Function<F>::Argument##N
+#define GMOCK_ARG_(tn, F, N) tn ::testing::internal::Function<F>::Argument##N
// The matcher type for argument N of function type F.
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_MATCHER(tn, F, N) const ::testing::Matcher<GMOCK_ARG(tn, F, N)>&
+#define GMOCK_MATCHER_(tn, F, N) const ::testing::Matcher<GMOCK_ARG_(tn, F, N)>&
// The variable for mocking the given method.
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_MOCKER(Method) GMOCK_CONCAT_TOKEN(gmock_##Method##_, __LINE__)
+#define GMOCK_MOCKER_(Method) GMOCK_CONCAT_TOKEN_(gmock_##Method##_, __LINE__)
$for i [[
$range j 1..i
$var arg_as = [[$for j, \
- [[GMOCK_ARG(tn, F, $j) gmock_a$j]]]]
+ [[GMOCK_ARG_(tn, F, $j) gmock_a$j]]]]
$var as = [[$for j, [[gmock_a$j]]]]
$var matcher_as = [[$for j, \
- [[GMOCK_MATCHER(tn, F, $j) gmock_a$j]]]]
+ [[GMOCK_MATCHER_(tn, F, $j) gmock_a$j]]]]
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
-#define GMOCK_METHOD$i(tn, constness, ct, Method, F) \
- GMOCK_RESULT(tn, F) ct Method($arg_as) constness { \
- GMOCK_COMPILE_ASSERT(::std::tr1::tuple_size< \
+#define GMOCK_METHOD$i[[]]_(tn, constness, ct, Method, F) \
+ GMOCK_RESULT_(tn, F) ct Method($arg_as) constness { \
+ GMOCK_COMPILE_ASSERT_(::std::tr1::tuple_size< \
tn ::testing::internal::Function<F>::ArgumentTuple>::value == $i, \
this_method_does_not_take_$i[[]]_argument[[$if i != 1 [[s]]]]); \
- GMOCK_MOCKER(Method).SetOwnerAndName(this, #Method); \
- return GMOCK_MOCKER(Method).Invoke($as); \
+ GMOCK_MOCKER_(Method).SetOwnerAndName(this, #Method); \
+ return GMOCK_MOCKER_(Method).Invoke($as); \
} \
::testing::MockSpec<F>& \
gmock_##Method($matcher_as) constness { \
- return GMOCK_MOCKER(Method).RegisterOwner(this).With($as); \
+ return GMOCK_MOCKER_(Method).RegisterOwner(this).With($as); \
} \
- mutable ::testing::FunctionMocker<F> GMOCK_MOCKER(Method)
+ mutable ::testing::FunctionMocker<F> GMOCK_MOCKER_(Method)
]]
$for i [[
-#define MOCK_METHOD$i(m, F) GMOCK_METHOD$i(, , , m, F)
+#define MOCK_METHOD$i(m, F) GMOCK_METHOD$i[[]]_(, , , m, F)
]]
$for i [[
-#define MOCK_CONST_METHOD$i(m, F) GMOCK_METHOD$i(, const, , m, F)
+#define MOCK_CONST_METHOD$i(m, F) GMOCK_METHOD$i[[]]_(, const, , m, F)
]]
$for i [[
-#define MOCK_METHOD$i[[]]_T(m, F) GMOCK_METHOD$i(typename, , , m, F)
+#define MOCK_METHOD$i[[]]_T(m, F) GMOCK_METHOD$i[[]]_(typename, , , m, F)
]]
$for i [[
-#define MOCK_CONST_METHOD$i[[]]_T(m, F) GMOCK_METHOD$i(typename, const, , m, F)
+#define MOCK_CONST_METHOD$i[[]]_T(m, F) [[]]
+GMOCK_METHOD$i[[]]_(typename, const, , m, F)
]]
$for i [[
-#define MOCK_METHOD$i[[]]_WITH_CALLTYPE(ct, m, F) GMOCK_METHOD$i(, , ct, m, F)
+#define MOCK_METHOD$i[[]]_WITH_CALLTYPE(ct, m, F) [[]]
+GMOCK_METHOD$i[[]]_(, , ct, m, F)
]]
$for i [[
#define MOCK_CONST_METHOD$i[[]]_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD$i(, const, ct, m, F)
+ GMOCK_METHOD$i[[]]_(, const, ct, m, F)
]]
$for i [[
#define MOCK_METHOD$i[[]]_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD$i(typename, , ct, m, F)
+ GMOCK_METHOD$i[[]]_(typename, , ct, m, F)
]]
$for i [[
#define MOCK_CONST_METHOD$i[[]]_T_WITH_CALLTYPE(ct, m, F) \
- GMOCK_METHOD$i(typename, const, ct, m, F)
+ GMOCK_METHOD$i[[]]_(typename, const, ct, m, F)
]]