Lines Matching +full:overloaded +full:- +full:virtual
5 In order for a method to be mocked, it must be *virtual*, unless you use the
6 [high-perf dependency injection technique](gmock_cook_book.md#MockingNonVirtualMethods).
20 provide overloaded versions of the function.
33 virtual void Bar(const int i) = 0;
45 warning C4301: 'MockFoo::Bar': overriding virtual function only differs from 'Foo::Bar' by const/vo…
52 warning C4373: 'MockFoo::Bar': virtual function overrides 'Foo::Bar', previous versions of the comp…
61 virtual void Bar(int i) = 0; // int or const int? Makes no difference.
72 Note that we are talking about the *top-level* `const` modifier here. If the
84 You might want to run your test with `--gmock_verbose=info`. This flag lets
139 Does the class (hopefully a pure interface) you are mocking have a virtual
142 Whenever you derive from a base class, make sure its destructor is virtual.
148 // Not virtual, but should be.
164 // - value_ is leaked.
167 By changing `~Base()` to virtual, `~Derived()` will be correctly called when
194 over-specify your tests, and we want to make it harder to do so.
232 fixture's set-up phase) and customize it with more specific rules later. If
243 `ON_CALL` in the set-up part of a test doesn't mean that the calls are expected.
268 Also, you can control the verbosity by specifying `--gmock_verbose=error`. Other
275 argument, you can use testing::DeleteArg<N>() to delete the N'th (zero-indexed)
316 [post](https://testing.googleblog.com/2008/06/defeat-static-cling.html) says it
321 I know it's not a question, but you get an answer for free any way. :-)
329 sometimes called "state-based testing".
331 Mocks are great for what some call "interaction-based" testing: instead of
335 more effective and economical to do than state-based testing.
337 If you are doing state-based testing and using a test double just to simulate
342 wrong problem. :-)
344 ### I got a warning "Uninteresting function call encountered - default action taken.." Should I pan…
346 By all means, NO! It's just an FYI. :-)
351 That's OK - you didn't say it's not OK to call the function!
364 Either way is fine - you want to choose the one that's more convenient for your
372 is the way to go here. See the implementation of `Return()` in `gmock-actions.h`
383 See this [recipe](gmock_cook_book.md#mocking-side-effects) for more details and