summaryrefslogtreecommitdiffstats
path: root/googlemock/include/gmock/gmock-generated-function-mockers.h.pump
diff options
context:
space:
mode:
authorChris Johnson <chrisjohnsonmail@gmail.com>2019-08-27 23:00:04 (GMT)
committerGitHub <noreply@github.com>2019-08-27 23:00:04 (GMT)
commit85f059f03d56ce82cf8f68cf7505b695a0c730c2 (patch)
treee715b911578e831d7a3fdf46bbf2bdbece4fafc3 /googlemock/include/gmock/gmock-generated-function-mockers.h.pump
parent130e5aa86a7a71501cf8fa7cd6f507928f01bd79 (diff)
parentfdd6a1dc8c74bf37211c14a1b2e4b64755bb3380 (diff)
downloadgoogletest-85f059f03d56ce82cf8f68cf7505b695a0c730c2.zip
googletest-85f059f03d56ce82cf8f68cf7505b695a0c730c2.tar.gz
googletest-85f059f03d56ce82cf8f68cf7505b695a0c730c2.tar.bz2
Merge pull request #3 from google/master
Update master
Diffstat (limited to 'googlemock/include/gmock/gmock-generated-function-mockers.h.pump')
-rw-r--r--googlemock/include/gmock/gmock-generated-function-mockers.h.pump11
1 files changed, 3 insertions, 8 deletions
diff --git a/googlemock/include/gmock/gmock-generated-function-mockers.h.pump b/googlemock/include/gmock/gmock-generated-function-mockers.h.pump
index 73b68b9..a56e132 100644
--- a/googlemock/include/gmock/gmock-generated-function-mockers.h.pump
+++ b/googlemock/include/gmock/gmock-generated-function-mockers.h.pump
@@ -42,15 +42,12 @@ $var n = 10 $$ The maximum arity we support.
#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_
+#include <functional>
#include <utility>
#include "gmock/gmock-spec-builders.h"
#include "gmock/internal/gmock-internal-utils.h"
-#if GTEST_HAS_STD_FUNCTION_
-# include <functional>
-#endif
-
namespace testing {
namespace internal {
@@ -127,7 +124,7 @@ using internal::FunctionMocker;
// The type of argument N of the given function type.
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
#define GMOCK_ARG_(tn, N, ...) \
- tn ::testing::internal::Function<__VA_ARGS__>::Argument##N
+ tn ::testing::internal::Function<__VA_ARGS__>::template Arg<N-1>::type
// The matcher type for argument N of the given function type.
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
@@ -152,11 +149,9 @@ $var anything_matchers = [[$for j, \
[[::testing::A<GMOCK_ARG_(tn, $j, __VA_ARGS__)>()]]]]
// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!!
#define GMOCK_METHOD$i[[]]_(tn, constness, ct, Method, ...) \
+ static_assert($i == ::testing::internal::Function<__VA_ARGS__>::ArgumentCount, "MOCK_METHOD<N> must match argument count.");\
GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \
$arg_as) constness { \
- GTEST_COMPILE_ASSERT_((::std::tuple_size< \
- tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value == $i), \
- this_method_does_not_take_$i[[]]_argument[[$if i != 1 [[s]]]]); \
GMOCK_MOCKER_($i, constness, Method).SetOwnerAndName(this, #Method); \
return GMOCK_MOCKER_($i, constness, Method).Invoke($as); \
} \