Lines Matching refs:MOCK_METHOD

15 Mock classes are defined as normal classes, using the `MOCK_METHOD` macro to
21 MOCK_METHOD(ReturnType, MethodName, (Args...));
22 MOCK_METHOD(ReturnType, MethodName, (Args...), (Specs...));
45 `MOCK_METHOD` from parsing its arguments correctly:
51 MOCK_METHOD(std::pair<bool, int>, GetPair, ()); // Won't compile!
52 MOCK_METHOD(bool, CheckMap, (std::map<int, double>, bool)); // Won't compile!
62 MOCK_METHOD((std::pair<bool, int>), GetPair, ());
63 MOCK_METHOD(bool, CheckMap, ((std::map<int, double>), bool));
68 invalid C++. `MOCK_METHOD` removes the parentheses.
77 MOCK_METHOD(BoolAndInt, GetPair, ());
79 MOCK_METHOD(bool, CheckMap, (MapIntDouble, bool));
85 You must always put a mock method definition (`MOCK_METHOD`) in a `public:`
108 MOCK_METHOD(bool, Transform, (Gadget* g), (override));
112 MOCK_METHOD(void, Resume, (), (override));
113 MOCK_METHOD(int, GetTimeOut, (), (override));
139 MOCK_METHOD(int, Add, (Element x), (override));
140 MOCK_METHOD(int, Add, (int times, Element x), (override));
142 MOCK_METHOD(Bar&, GetBar, (), (override));
143 MOCK_METHOD(const Bar&, GetBar, (), (const, override));
156 MOCK_METHOD(int, Add, (Element x), (override));
180 MOCK_METHOD(int, GetSize, (), (override));
181 MOCK_METHOD(void, Push, (const Elem& x), (override));
208 MOCK_METHOD(const Packet*, GetPacket, (size_t packet_number), (const));
209 MOCK_METHOD(size_t, NumberOfPackets, (), (const));
294 Before the generic `MOCK_METHOD` macro
297 These macros are still supported, though migration to the new `MOCK_METHOD` is
300 The macros in the `MOCK_METHODn` family differ from `MOCK_METHOD`:
303 instead of `MOCK_METHOD(ReturnType, MethodName, (Args))`.
320 <td><code>MOCK_METHOD(bool, Foo, (int))</code></td>
330 <td><code>MOCK_METHOD(bool, Foo, (int), (const))</code></td>
340 <td><code>MOCK_METHOD(bool, Foo, (int))</code></td>
350 <td><code>MOCK_METHOD(bool, Foo, (int), (const))</code></td>
360 <td><code>MOCK_METHOD(bool, Foo, (int), (Calltype(STDMETHODCALLTYPE)))</code></td>
370 <td><code>MOCK_METHOD(bool, Foo, (int), (const, Calltype(STDMETHODCALLTYPE)))</code></td>
380 <td><code>MOCK_METHOD(bool, Foo, (int), (Calltype(STDMETHODCALLTYPE)))</code></td>
390 <td><code>MOCK_METHOD(bool, Foo, (int), (const, Calltype(STDMETHODCALLTYPE)))</code></td>
471 defined using the `MOCK_METHOD` macro **directly** in the `MockFoo` class.
531 MOCK_METHOD(void, Log,
551 MOCK_METHOD(Turtle*, DoMakeTurtle, ());
662 MOCK_METHOD(char, DoThis, (int n), (override));
663 MOCK_METHOD(void, DoThat, (const char* s, int* p), (override));
773 MOCK_METHOD(char, DoThis, ...);
774 MOCK_METHOD(void, DoThat, ...);
812 MOCK_METHOD(void, Pure, (int n), (override));
814 MOCK_METHOD(int, Concrete, (const char* str), (override));
955 MOCK_METHOD(void, DoThis, (Derived* derived), (override));
985 MOCK_METHOD(Bar&, GetBar, (), (override));
986 MOCK_METHOD(const Bar&, GetBar, (), (const, override));
1012 MOCK_METHOD(void, Print, (int n), (override));
1013 MOCK_METHOD(void, Print, (char c), (override));
1376 MOCK_METHOD(void, Foo, (const vector<int>& numbers), (override));
1391 MOCK_METHOD(void, Foo, (const vector<int>& numbers), (override));
1837 MOCK_METHOD(Bar&, GetBar, (), (override));
1868 MOCK_METHOD(int, GetValue, (), (override));
1920 MOCK_METHOD(bool, Bar, (int n), (override));
1976 MOCK_METHOD(void, Mutate, (bool mutate, int* value), (override));
2005 MOCK_METHOD(bool, MutateInt, (int* value), (override));
2028 MOCK_METHOD(void, Mutate, (int* values, int num_values), (override));
2046 MOCK_METHOD(void, GetNames, (std::back_insert_iterator<vector<string>>),
2120 MOCK_METHOD(Bar, CalculateBar, (), (override));
2194 MOCK_METHOD(int, Sum, (int x, int y), (override));
2195 MOCK_METHOD(bool, ComplexJob, (int x), (override));
2260 MOCK_METHOD(char, DoThis, (int n), (override));
2300 MOCK_METHOD(bool, ComplexJob, (int n), (override));
2342 MOCK_METHOD(bool, DoThis, (int n, (ResultCallback1<bool, int>* callback)),
2392 MOCK_METHOD(bool, Bar,
2416 MOCK_METHOD(bool, DoThat, (bool (*f)(const double& x, const string& s)),
2451 MOCK_METHOD(void, Abc, (const MyData& data), (override));
2452 MOCK_METHOD(bool, Xyz, (), (override));
2481 MOCK_METHOD(bool, Foo,
2571 MOCK_METHOD(double, Foo, double(const string& label, double x, double y),
2573 MOCK_METHOD(double, Bar, (int index, double x, double y), (override));
2681 MOCK_METHOD(bool, DispatchEvent, (int32), (override));
2751 familiar `MOCK_METHOD` syntax as usual:
2756 MOCK_METHOD(std::unique_ptr<Buzz>, MakeBuzz, (StringPiece text), (override));
2757 MOCK_METHOD(bool, ShareBuzz, (std::unique_ptr<Buzz> buzz, int64_t timestamp),
2859 MOCK_METHOD(bool, DoShareBuzz, (Buzz* buzz, Time timestamp));
2909 MOCK_METHOD(int, DoThis, (), (override));
2910 MOCK_METHOD(bool, DoThat, (const char* str), (override));
2926 MOCK_METHOD(int, DoThis, (), (override));
2927 MOCK_METHOD(bool, DoThat, (const char* str), (override));
3049 with special syntax and special semantics, and the `MOCK_METHOD` macro doesn't
3053 MOCK_METHOD(void, ~MockFoo, ()); // Won't compile!
3064 MOCK_METHOD(void, Die, ());
3211 MOCK_METHOD(void, F, (const string& x, const string& y));
4296 MOCK_METHOD(int, DoThis, (bool flag, int n), (override));
4297 MOCK_METHOD(string, DoThat, (int x, const char* str1, const char* str2),