Lines Matching refs:Action
584 // Implements the WithArgs action.
590 explicit WithArgsAction(const InnerAction& action) : action_(action) {}
593 operator Action<F>() const { return MakeAction(new Impl<F>(action_)); }
602 explicit Impl(const InnerAction& action) : action_(action) {}
613 Action<InnerFunctionType> action_;
621 // A macro from the ACTION* family (defined later in this file)
622 // defines an action that can be used in a mock function. Typically,
624 // function. For example, if such an action only uses the second
628 // Therefore, the action implementation must be prepared to take more
637 // A helper class needed for implementing the ACTION* macros.
756 // WithArgs<N1, N2, ..., Nk>(an_action) creates an action that passes
763 WithArgs(const InnerAction& action) {
764 return internal::WithArgsAction<InnerAction, k1>(action);
769 WithArgs(const InnerAction& action) {
770 return internal::WithArgsAction<InnerAction, k1, k2>(action);
775 WithArgs(const InnerAction& action) {
776 return internal::WithArgsAction<InnerAction, k1, k2, k3>(action);
781 WithArgs(const InnerAction& action) {
782 return internal::WithArgsAction<InnerAction, k1, k2, k3, k4>(action);
787 WithArgs(const InnerAction& action) {
788 return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5>(action);
793 WithArgs(const InnerAction& action) {
794 return internal::WithArgsAction<InnerAction, k1, k2, k3, k4, k5, k6>(action);
800 WithArgs(const InnerAction& action) {
802 k7>(action);
808 WithArgs(const InnerAction& action) {
810 k8>(action);
816 action) {
818 k9>(action);
825 WithArgs(const InnerAction& action) {
827 k9, k10>(action);
830 // Creates an action that does actions a1, a2, ..., sequentially in
922 // The ACTION* family of macros can be used in a namespace scope to
925 // ACTION(name) { statements; }
927 // will define an action with the given name that executes the
929 // the return value of the action. Inside the statements, you can
933 // ACTION(IncrementArg1) {
952 // Sometimes you'll want to parameterize the action. For that you can use
995 // While it's tempting to always use the ACTION* macros when defining
996 // a new action, you should also consider implementing ActionInterface
998 // use the action a lot. While these approaches require more work,
1000 // arguments and the action parameters, which in general leads to
1007 // ACTION*() can only be used in a namespace scope. The reason is
1010 // Once that's done, we'll consider supporting using ACTION*() inside
1015 // To learn more about using these macros, please search for 'ACTION'
1018 // An internal macro needed for implementing ACTION*().
1032 // Sometimes you want to give an action explicit template parameters
1033 // that cannot be inferred from its value parameters. ACTION() and
1035 // and can be viewed as an extension to ACTION() and ACTION_P*().
1043 // defines an action template that takes m explicit template
1063 // To create an instance of an action template, write:
1076 // ACTION_TEMPLATE and ACTION/ACTION_P* can be overloaded on the
1083 // Are we using a single-template-parameter action where 'bool' refers
1084 // to the type of x, or are we using a two-template-parameter action
1108 // allows us to implement action templates using O(N) code, where N is
1362 // The suffix of the class template implementing the action template.
1378 // The name of the class template implementing the action template.
1380 GTEST_CONCAT_TOKEN_(name##Action, GMOCK_INTERNAL_COUNT_##value_params)
1413 template <typename F> operator ::testing::Action<F>() const {\
1414 return ::testing::Action<F>(\
1446 #define ACTION(name)\
1447 class name##Action {\
1449 name##Action() {}\
1473 template <typename F> operator ::testing::Action<F>() const {\
1474 return ::testing::Action<F>(new gmock_Impl<F>());\
1477 GTEST_DISALLOW_ASSIGN_(name##Action);\
1479 inline name##Action name() {\
1480 return name##Action();\
1488 name##Action
1520 template <typename F> operator ::testing::Action<F>() const {\
1521 return ::testing::Action<F>(new gmock_Impl<F>(p0));\
1573 template <typename F> operator ::testing::Action<F>() const {\
1574 return ::testing::Action<F>(new gmock_Impl<F>(p0, p1));\
1629 template <typename F> operator ::testing::Action<F>() const {\
1630 return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2));\
1691 template <typename F> operator ::testing::Action<F>() const {\
1692 return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3));\
1760 template <typename F> operator ::testing::Action<F>() const {\
1761 return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4));\
1832 template <typename F> operator ::testing::Action<F>() const {\
1833 return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5));\
1908 template <typename F> operator ::testing::Action<F>() const {\
1909 return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
1992 template <typename F> operator ::testing::Action<F>() const {\
1993 return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
2081 template <typename F> operator ::testing::Action<F>() const {\
2082 return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
2174 template <typename F> operator ::testing::Action<F>() const {\
2175 return ::testing::Action<F>(new gmock_Impl<F>(p0, p1, p2, p3, p4, p5, \
2221 // The ACTION*() macros trigger warning C4100 (unreferenced formal
2233 // The InvokeArgument<N>(a1, a2, ..., a_k) action invokes the N-th
2251 // argument of the mock function takes a const string&, the action
2258 // InvokeArgument action from temporary values and have it performed
2340 // The ReturnNew<T>(a1, a2, ..., a_k) action returns a pointer to a new