Lines Matching +refs:make +refs:template
4 [the dummy guide](gmock_for_dummies.md) first to make sure you understand the
167 template <typename Elem>
177 template <typename Elem>
223 More specifically, you will give your code a template type argument for the type
224 of the packet stream. In production, you will instantiate your template with
226 same template with `MockPacketStream`. For example, you may write:
229 template <class PacketStream>
232 template <class PacketStream>
306 * When mocking a class template, the macro name must be suffixed with `_T`.
402 sometimes you may want to treat them as errors. gMock lets you make the decision
481 mocks, as they tend to make tests more brittle and harder to maintain. When you
537 By defining a new mock method with a trimmed argument list, we make the mock
540 This technique may also be applied to make overloaded methods more amenable to
567 may be tempted to make the methods of `Concrete` virtual and then mock it.
574 should make a function virtual only when there is a valid reason for a subclass
579 your tests and make test maintenance a pain.
1032 active will be selected (think "newer overrides older"). So, you can make a
1268 what if you want to make sure the value *pointed to* by the pointer, instead of
1607 In gMock, `NiceMock` and `StrictMock` can be used to make a mock class "nice" or
2083 and make a mock method get its return value from that variable:
2113 `::testing::DefaultValue` class template:
2141 Please note that changing the default value for a type can make your tests hard
2143 you may want to make sure the `Set()` and `Clear()` calls are right next to the
2409 argument in `std::ref()`? Then `InvokeArgument()` will *make a copy* of the
2558 to make a mock function and an action with incompatible argument lists fit
3038 nothing should happen between the two checkpoints. The explicit checkpoints make
3043 Sometimes you want to make sure a mock object is destructed at the right time,
3114 * When doing step #2 and #5, make sure no other thread is accessing `foo`.
3141 `action1` and `action2` to make the test thread-safe.
3272 To make it even easier, you can add the following lines to your `~/.emacs` file:
3275 (global-set-key "\M-m" 'google-compile) ; m is for make
3281 just make sure `foo_test.run` or `runtests` is in the build command you supply
3528 template <typename p1_type, ..., typename pk_type>
3536 template, as in `Foo<long, bool>(5, false)`. As said earlier, you don't get to
3546 While you can instantiate a matcher template with reference types, passing the
3674 // To implement a polymorphic matcher, we just need to make MatchAndExplain a
3675 // template on its first argument.
3680 // a method template, or even overload it.
3681 template <typename T>
3717 template <typename T>
3724 template <typename T>
3759 // a method template, or even overload it.
3760 template <typename T>
3867 template <typename T>
3917 operators to make that possible. See `gmock-actions.h` for examples.
4087 Sometimes you want to give an action explicit template parameters that cannot be
4099 defines an action template that takes *m* explicit template parameters and *n*
4101 name of the *i*-th template parameter, and `kind_i` specifies whether it's a
4102 `typename`, an integral constant, or a template. `p_i` is the name of the *i*-th
4118 To create an instance of an action template, write:
4124 where the `t`s are the template arguments and the `v`s are the value arguments.
4135 additional template arguments:
4144 value parameters, but not on the number of template parameters. Without the
4151 Are we using a single-template-parameter action where `bool` refers to the type
4152 of `x`, or a two-template-parameter action where the compiler is asked to infer
4191 template <typename F>
4243 *polymorphic*. The `MakePolymorphicAction()` function template makes it easy to
4248 template <typename Impl>
4260 template <typename Result, typename ArgumentTuple>
4269 What matters is that it must have a `Perform()` method template. This method
4270 template takes the mock function's arguments as a tuple in a **single**
4272 but must be invocable with exactly one template argument, which is the result