Lines Matching defs:Action

529   Action<MyGlobalFunction> action = MakeAction(new MyActionImpl);
531 // When exercising the Perform() method of Action<F>, we must pass
539 // Tests that Action<F> can be constructed from a pointer to
542 Action<MyGlobalFunction> action(new MyActionImpl);
545 // Tests that Action<F> delegates actual work to ActionInterface<F>.
547 const Action<MyGlobalFunction> action(new MyActionImpl);
553 // Tests that Action<F> can be copied.
555 Action<MyGlobalFunction> a1(new MyActionImpl);
556 Action<MyGlobalFunction> a2(a1); // Tests the copy constructor.
577 // Tests that an Action<From> object can be converted to a
578 // compatible Action<To> object.
588 const Action<bool(int)> a1(new IsNotZero); // NOLINT
589 const Action<int(char)> a2 = Action<int(char)>(a1); // NOLINT
641 Action<int(bool, int, double)> a1 = ReturnSecondArgument(); // NOLINT
648 Action<int()> a1 = ReturnZeroFromNullaryFunction();
651 Action<void*()> a2 = ReturnZeroFromNullaryFunction();
658 const Action<void(int)> ret = Return(); // NOLINT
664 Action<int()> ret = Return(1); // NOLINT
673 Action<const char*()> a1 = Return("Hello");
676 Action<std::string()> a2 = Return("world");
786 static_assert(!std::is_convertible<RA, Action<S()>>::value, "");
803 // The result of Return should not be convertible to Action (so it can't be
806 Action<std::unique_ptr<int>()>>::value,
823 Action<Base*()> ret = Return(&base);
831 // when the action is cast to Action<T(...)> rather than when the action is
852 Action<ToType()> action(Return(x));
857 EXPECT_FALSE(converted) << "Action must NOT convert its argument "
863 const Action<int*()> a1 = ReturnNull();
866 const Action<const char*(bool)> a2 = ReturnNull(); // NOLINT
873 const Action<std::unique_ptr<const int>()> a1 = ReturnNull();
876 const Action<std::shared_ptr<int>(std::string)> a2 = ReturnNull();
883 const Action<const int&(bool)> ret = ReturnRef(n); // NOLINT
892 Action<Base&()> a = ReturnRef(base);
939 const Action<const int&()> ret = ReturnRefOfCopy(n);
953 Action<Base&()> a = ReturnRefOfCopy(base);
962 Action<int()> ret = ReturnRoundRobin({1, 2, 3});
975 Action<double()> ret = ReturnRoundRobin(v);
1074 Action<MyFunction> a = SetArgPointee<1>(2);
1093 Action<MyFunction> a = SetArgPointee<0>("hi");
1109 Action<MyFunction> a = SetArgPointee<0>(L"world");
1117 Action<MyStringFunction> a2 = SetArgPointee<0>(L"world");
1129 Action<MyFunction> a = SetArgPointee<1>(hi);
1148 Action<MyFunction> a = SetArgPointee<1>(hi);
1158 Action<MyStringFunction> a2 = SetArgPointee<1>(world);
1169 Action<MyFunction> a = SetArgumentPointee<1>(2);
1229 Action<int(int)> a = InvokeWithoutArgs(Nullary); // NOLINT
1233 Action<int(int, double)> a2 = InvokeWithoutArgs(Nullary); // NOLINT
1237 Action<void(int)> a3 = InvokeWithoutArgs(VoidNullary); // NOLINT
1246 Action<int()> a = InvokeWithoutArgs(NullaryFunctor()); // NOLINT
1250 Action<int(int, double, char)> a2 = // NOLINT
1255 Action<void()> a3 = InvokeWithoutArgs(VoidNullaryFunctor());
1264 Action<int(bool, char)> a = // NOLINT
1271 Action<void(int)> a = IgnoreResult(Return(5)); // NOLINT
1284 Action<void()> a = IgnoreResult(Invoke(ReturnOne));
1298 Action<void(int)> a =
1306 Action<void(int)> a = Assign(&x, 5);
1313 Action<void(void)> a = Assign(&x, "Hello, world");
1320 Action<void(int)> a = Assign(&x, 5);
1449 // DoAll should support being used with type-erased Action objects, both through
1453 const Action<void()> initial_action = [] {};
1454 const Action<int()> final_action = [] { return 17; };
1481 Action<bool(double x, int n)> a = WithArgs<1>(Invoke(Unary)); // NOLINT
1488 Action<const char*(const char* s, double x, short n)> a = // NOLINT
1504 Action<std::string(const char*, const char*, const char*, const char*)> a =
1520 Action<int(const std::string&, int, int)> a =
1529 Action<int(int x, char y, short z)> a = // NOLINT
1536 Action<int(bool, int m, int n)> a = // NOLINT
1543 Action<const char*(short n, const char* input)> a = // NOLINT
1551 Action<long(short x, char y, double z, char c)> a = // NOLINT
1559 Action<void(double x, char c, int n)> a = WithArgs<2, 1>(Invoke(VoidBinary));
1566 Action<int&(int&, void*)> aa = WithArgs<0>([](int& a) -> int& { return a; });
1573 Action<Derived*()> inner = [] { return nullptr; };
1608 Action<int(void)> a = SetErrnoAndReturn(ENOTTY, -5);
1615 Action<int*(void)> a = SetErrnoAndReturn(ENOTTY, &x);
1621 Action<double()> a = SetErrnoAndReturn(EINVAL, 5);
1718 Action<UnaryConstructorClass*()> a = ReturnNew<UnaryConstructorClass>(4000);
1725 Action<UnaryConstructorClass*(bool, int)> a =
1733 Action<const UnaryConstructorClass*()> a =
1750 Action<TenArgConstructorClass*()> a = ReturnNew<TenArgConstructorClass>(
1877 // Action is directly compatible with mocked function type.
1885 // Action doesn't want mocked function arguments.
2024 operator Action<int(Args...)>() const { // NOLINT
2030 // defines templated conversion operators to OnceAction and Action. WillOnce
2065 Action<int(int, int&, int*)> a = &Add;
2071 Action<int(std::unique_ptr<int>)> a1 = &Deref;
2076 Action<int(bool, int)> a1 = [](bool b, int i) { return b ? i : 0; };
2081 Action<void(std::unique_ptr<int>)> a2 = [&saved](std::unique_ptr<int> p) {
2089 Action<int(int)> ai = Double();
2091 Action<double(double)> ad = Double(); // Double? Double double!
2097 const Action<bool(int)> a1 = [](int i) { return i > 1; };
2098 const Action<int(bool)> a2 = Action<int(bool)>(a1);
2103 const Action<bool(std::string)> s1 = [](std::string s) { return !s.empty(); };
2104 const Action<int(const char*)> s2 = Action<int(const char*)>(s1);
2109 const Action<bool(std::string)> x1 = [](Unused) { return 42; };
2110 const Action<bool(std::string)> x2 = [] { return 42; };
2116 Action<int(int)> d = f;
2121 Action<void(int)>(nullptr);
2126 Action<int(int, double y, double z)> a = [](int i, Unused, Unused) {
2135 Action<int(std::unique_ptr<int>)> a = Return(1);
2141 Action<void(std::unique_ptr<int>, int*)> a2 = testing::SetArgPointee<1>(3);
2151 1, testing::Action<int(int)>(ReturnArity()).Perform(std::make_tuple(0)));
2154 testing::Action<int(int, int, int, int, int, int, int, int, int, int)>(
2159 testing::Action<int(int, int, int, int, int, int, int, int, int, int, int,