36 #ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_ 37 #define GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_ 51 template <
typename FunctionImpl>
57 : function_impl_(function_impl) {}
59 template <
typename Result,
typename ArgumentTuple>
65 FunctionImpl function_impl_;
71 template <
class Class,
typename MethodPtr>
75 : method_ptr_(method_ptr), obj_ptr_(obj_ptr) {}
77 template <
typename Result,
typename ArgumentTuple>
80 obj_ptr_, method_ptr_, args);
87 const MethodPtr method_ptr_;
88 Class*
const obj_ptr_;
97 template<
typename InputIterator,
typename OutputIterator>
101 for (; first != last; ++first, ++
output) {
113 template <
typename FunctionImpl>
115 FunctionImpl function_impl) {
122 template <
class Class,
typename MethodPtr>
124 Class* obj_ptr, MethodPtr method_ptr) {
133 template <
typename InnerAction>
144 template <
int k,
typename InnerAction>
156 # pragma warning(push) 157 # pragma warning(disable:4100) 162 HAS_1_TEMPLATE_PARAMS(
int, k),
163 AND_0_VALUE_PARAMS()) {
164 return ::testing::get<k>(
args);
170 HAS_1_TEMPLATE_PARAMS(
int, k),
171 AND_1_VALUE_PARAMS(pointer)) {
172 *pointer = ::testing::get<k>(
args);
178 HAS_1_TEMPLATE_PARAMS(
int, k),
179 AND_1_VALUE_PARAMS(pointer)) {
180 *pointer = *::testing::get<k>(
args);
186 HAS_1_TEMPLATE_PARAMS(
int, k),
187 AND_1_VALUE_PARAMS(value)) {
193 SetArgReferee_must_be_used_with_a_reference_argument);
194 ::testing::get<k>(
args) = value;
203 HAS_1_TEMPLATE_PARAMS(
int, k),
204 AND_2_VALUE_PARAMS(first, last)) {
209 ::std::copy(first, last, ::testing::get<k>(
args));
216 HAS_1_TEMPLATE_PARAMS(
int, k),
217 AND_0_VALUE_PARAMS()) {
218 delete ::testing::get<k>(
args);
222 ACTION_P(ReturnPointee, pointer) {
return *pointer; }
226 #if GTEST_HAS_EXCEPTIONS 230 # pragma warning(push) // Saves the current warning state. 231 # pragma warning(disable:4702) // Temporarily disables warning 4702. 233 ACTION_P(Throw, exception) {
throw exception; }
235 # pragma warning(pop) // Restores the warning state. 238 #endif // GTEST_HAS_EXCEPTIONS 241 # pragma warning(pop) 246 #endif // GMOCK_INCLUDE_GMOCK_GMOCK_MORE_ACTIONS_H_ def args
Definition: android_test.py:111
Definition: gmock-actions.h:53
Definition: gmock-generated-actions.h:461
Definition: gmock-more-actions.h:72
Result Perform(const ArgumentTuple &args) const
Definition: gmock-more-actions.h:78
Definition: gmock-generated-actions.h:51
PolymorphicAction< Impl > MakePolymorphicAction(const Impl &impl)
Definition: gmock-actions.h:475
#define GTEST_DISALLOW_ASSIGN_(type)
Definition: gtest-port.h:869
internal::WithArgsAction< InnerAction, k > WithArg(const InnerAction &action)
Definition: gmock-more-actions.h:146
Definition: gmock-more-actions.h:52
#define GTEST_COMPILE_ASSERT_(expr, msg)
Definition: gtest-port.h:1032
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
Definition: gmock-more-actions.h:114
ACTION_TEMPLATE(InvokeArgument, HAS_1_TEMPLATE_PARAMS(int, k), AND_0_VALUE_PARAMS())
Definition: gmock-generated-actions.h:2196
InvokeMethodAction(Class *obj_ptr, MethodPtr method_ptr)
Definition: gmock-more-actions.h:74
Result Perform(const ArgumentTuple &args)
Definition: gmock-more-actions.h:60
Definition: gmock-internal-utils.h:340
InvokeAction(FunctionImpl function_impl)
Definition: gmock-more-actions.h:56
Definition: gmock-actions.h:427
output
Definition: gmock_output_test.py:175
type
Definition: upload.py:443
PolymorphicAction< internal::InvokeMethodAction< Class, MethodPtr > > Invoke(Class *obj_ptr, MethodPtr method_ptr)
Definition: gmock-more-actions.h:123
internal::WithArgsAction< InnerAction > WithoutArgs(const InnerAction &action)
Definition: gmock-more-actions.h:135
OutputIterator CopyElements(InputIterator first, InputIterator last, OutputIterator output)
Definition: gmock-more-actions.h:98
ACTION_P(ReturnPointee, pointer)
Definition: gmock-more-actions.h:222
action
Definition: upload.py:393