Lines Matching refs:Action

49 using testing::Action;
387 Action<MyGlobalFunction> action = MakeAction(new MyActionImpl);
389 // When exercising the Perform() method of Action<F>, we must pass
397 // Tests that Action<F> can be contructed from a pointer to
400 Action<MyGlobalFunction> action(new MyActionImpl);
403 // Tests that Action<F> delegates actual work to ActionInterface<F>.
405 const Action<MyGlobalFunction> action(new MyActionImpl);
411 // Tests that Action<F> can be copied.
413 Action<MyGlobalFunction> a1(new MyActionImpl);
414 Action<MyGlobalFunction> a2(a1); // Tests the copy constructor.
435 // Tests that an Action<From> object can be converted to a
436 // compatible Action<To> object.
452 const Action<bool(int)> a1(new IsNotZero); // NOLINT
453 const Action<int(char)> a2 = Action<int(char)>(a1); // NOLINT
502 Action<int(bool, int, double)> a1 = ReturnSecondArgument(); // NOLINT
509 Action<int()> a1 = ReturnZeroFromNullaryFunction();
512 Action<void*()> a2 = ReturnZeroFromNullaryFunction();
519 const Action<void(int)> ret = Return(); // NOLINT
525 Action<int()> ret = Return(1); // NOLINT
534 Action<const char*()> a1 = Return("Hello");
537 Action<std::string()> a2 = Return("world");
554 // Return() called with 'v' as argument. The Action will return the same data
556 Action<IntegerVectorWrapper()> a = Return(v);
574 Action<Base*()> ret = Return(&base);
582 // when the action is cast to Action<T(...)> rather than when the action is
605 Action<ToType()> action(Return(x));
610 EXPECT_FALSE(converted) << "Action must NOT convert its argument "
624 Action<DestinationType()> action(Return(s));
629 const Action<int*()> a1 = ReturnNull();
632 const Action<const char*(bool)> a2 = ReturnNull(); // NOLINT
640 const Action<std::unique_ptr<const int>()> a1 = ReturnNull();
643 const Action<std::shared_ptr<int>(std::string)> a2 = ReturnNull();
651 const Action<const int&(bool)> ret = ReturnRef(n); // NOLINT
660 Action<Base&()> a = ReturnRef(base);
670 const Action<const int&()> ret = ReturnRefOfCopy(n);
684 Action<Base&()> a = ReturnRefOfCopy(base);
787 Action<MyFunction> a = SetArgPointee<1>(2);
808 Action<MyFunction> a = SetArgPointee<0>("hi");
824 Action<MyFunction> a = SetArgPointee<0>(L"world");
832 Action<MyStringFunction> a2 = SetArgPointee<0>(L"world");
845 Action<MyFunction> a = SetArgPointee<1>(hi);
864 Action<MyFunction> a = SetArgPointee<1>(hi);
874 Action<MyStringFunction> a2 = SetArgPointee<1>(world);
891 Action<void(bool, TestMessage*)> a = SetArgPointee<1>(*msg);
913 Action<void(bool, ::ProtocolMessage*)> a = SetArgPointee<1>(*msg);
938 Action<void(bool, FooMessage*)> a = SetArgPointee<1>(*msg);
963 Action<void(bool, ::proto2::Message*)> a = SetArgPointee<1>(*msg);
984 Action<MyFunction> a = SetArgumentPointee<1>(2);
1010 Action<void(bool, TestMessage*)> a = SetArgumentPointee<1>(*msg);
1032 Action<void(bool, ::ProtocolMessage*)> a = SetArgumentPointee<1>(*msg);
1057 Action<void(bool, FooMessage*)> a = SetArgumentPointee<1>(*msg);
1082 Action<void(bool, ::proto2::Message*)> a = SetArgumentPointee<1>(*msg);
1128 Action<int(int)> a = InvokeWithoutArgs(Nullary); // NOLINT
1132 Action<int(int, double)> a2 = InvokeWithoutArgs(Nullary); // NOLINT
1136 Action<void(int)> a3 = InvokeWithoutArgs(VoidNullary); // NOLINT
1145 Action<int()> a = InvokeWithoutArgs(NullaryFunctor()); // NOLINT
1149 Action<int(int, double, char)> a2 = // NOLINT
1154 Action<void()> a3 = InvokeWithoutArgs(VoidNullaryFunctor());
1163 Action<int(bool, char)> a = // NOLINT
1170 Action<void(int)> a = IgnoreResult(Return(5)); // NOLINT
1183 Action<void()> a = IgnoreResult(Invoke(ReturnOne));
1197 Action<void(int)> a =
1205 Action<void(int)> a = Assign(&x, 5);
1212 Action<void(void)> a = Assign(&x, "Hello, world");
1219 Action<void(int)> a = Assign(&x, 5);
1233 Action<int(void)> a = SetErrnoAndReturn(ENOTTY, -5);
1240 Action<int*(void)> a = SetErrnoAndReturn(ENOTTY, &x);
1246 Action<double()> a = SetErrnoAndReturn(EINVAL, 5);