Lines Matching refs:argument
66 convention as the first argument to the macro. For example,
154 A **matcher** matches a _single_ argument. You can use it inside
163 Built-in matchers (where `argument` is the function argument) are
169 |`_`|`argument` can be any value of the correct type.|
170 |`A<type>()` or `An<type>()`|`argument` can be any value of type `type`. |
176 |`Eq(value)` or `value`|`argument == value`|
177 |`Ge(value)` |`argument >= value`|
178 |`Gt(value)` |`argument > value` |
179 |`Le(value)` |`argument <= value`|
180 |`Lt(value)` |`argument < value` |
181 |`Ne(value)` |`argument != value`|
182 |`IsNull()` |`argument` is a `NULL` pointer (raw or smart).|
183 |`NotNull()` |`argument` is a non-null pointer (raw or smart).|
184 |`Optional(m)` |`argument` is `optional<>` that contains a value matching `m`.|
185 |`VariantWith<T>(m)` |`argument` is `variant<>` that holds the alternative of type T with a value…
186 |`Ref(variable)` |`argument` is a reference to `variable`.|
187 |`TypedEq<type>(value)`|`argument` has type `type` and is equal to `value`. You may need to use thi…
200 |`DoubleEq(a_double)`|`argument` is a `double` value approximately equal to `a_double`, treating tw…
201 |`FloatEq(a_float)` |`argument` is a `float` value approximately equal to `a_float`, treating two …
202 |`NanSensitiveDoubleEq(a_double)`|`argument` is a `double` value approximately equal to `a_double`,…
203 |`NanSensitiveFloatEq(a_float)`|`argument` is a `float` value approximately equal to `a_float`, tre…
215 |`DoubleNear(a_double, max_abs_error)`|`argument` is a `double` value close to `a_double` (absolute…
216 |`FloatNear(a_float, max_abs_error)`|`argument` is a `float` value close to `a_float` (absolute err…
217 |`NanSensitiveDoubleNear(a_double, max_abs_error)`|`argument` is a `double` value close to `a_doubl…
218 |`NanSensitiveFloatNear(a_float, max_abs_error)`|`argument` is a `float` value close to `a_float` (…
222 The `argument` can be either a C string or a C++ string object:
226 |`ContainsRegex(string)`|`argument` matches the given regular expression. |
227 |`EndsWith(suffix)` |`argument` ends with string `suffix`. |
228 |`HasSubstr(string)` |`argument` contains `string` as a sub-string. |
229 |`MatchesRegex(string)` |`argument` matches the given regular expression with the match starting at…
230 |`StartsWith(prefix)` |`argument` starts with string `prefix`. |
231 |`StrCaseEq(string)` |`argument` is equal to `string`, ignoring case. |
232 |`StrCaseNe(string)` |`argument` is not equal to `string`, ignoring case.|
233 |`StrEq(string)` |`argument` is equal to `string`. |
234 |`StrNe(string)` |`argument` is not equal to `string`. |
252 | `Contains(e)` | `argument` contains an element that matches `e`, which can be either a value or a…
253 | `Each(e)` | `argument` is a container where _every_ element matches `e`, which can be either a va…
254 | `ElementsAre(e0, e1, ..., en)` | `argument` has `n + 1` elements, where the i-th element matches …
256 | `IsEmpty()` | `argument` is an empty container (`container.empty()`). |
257 …argument` contains the same number of elements as in `container`, and for all i, (the i-th element…
258 | `SizeIs(m)` | `argument` is a container whose size matches `m`. E.g. `SizeIs(2)` or `SizeIs(Lt(2)…
259 | `UnorderedElementsAre(e0, e1, ..., en)` | `argument` has `n + 1` elements, and under some permuta…
261 …When `argument` is sorted using the `<` operator, it matches container matcher `m`. E.g. `WhenSort…
262 …d(m)`, except that the given comparator instead of `<` is used to sort `argument`. E.g. `WhenSorte…
268 …nter and a count (e.g. in `Bar(const T* buffer, int len)` -- see [Multi-argument Matchers](#multia…
285 …(&class::field, m)`|`argument.field` (or `argument->field` when `argument` is a plain pointer) mat…
286 |`Key(e)`|`argument.first` matches `e`, which can be either a value or a matcher. E.g. `Contains(Ke…
287 |`Pair(m1, m2)`|`argument` is an `std::pair` whose `first` field matches `m1` and `second` field ma…
288 …:property, m)`|`argument.property()` (or `argument->property()` when `argument` is a plain pointer…
294 |`ResultOf(f, m)`|`f(argument)` matches matcher `m`, where `f` is a function or functor.|
300 |`Pointee(m)` |`argument` (either a smart pointer or a raw pointer) points to a value t…
301 |`WhenDynamicCastTo<T>(m)`| when `argument` is passed through `dynamic_cast<T>()`, it matches match…
305 Technically, all matchers match a _single_ value. A "multi-argument"
332 |`AllOf(m1, m2, ..., mn)`|`argument` matches all of the matchers `m1` to `mn`. |
333 |`AnyOf(m1, m2, ..., mn)`|`argument` matches at least one of the matchers `m1` to `mn`.|
334 |`Not(m)` |`argument` doesn't match matcher `m`. |
342 |`Truly(predicate)`|`predicate(argument)` returns something considered by C++ to be true, where `pr…
383 |`ReturnArg<N>()`|Return the `N`-th (0-based) argument.|
395 |`DeleteArg<N>()`| Delete the `N`-th (0-based) argument, which must be a pointer.|
396 |`SaveArg<N>(pointer)`| Save the `N`-th (0-based) argument to `*pointer`.|
397 |`SaveArgPointee<N>(pointer)`| Save the value pointed to by the `N`-th (0-based) argument to `*poin…
398 …ArgReferee<N>(value)` | Assign value to the variable referenced by the `N`-th (0-based) argument. |
399 |`SetArgPointee<N>(value)` |Assign `value` to the variable pointed by the `N`-th (0-based) argument…
401 …range [`first`, `last`) to the array pointed to by the `N`-th (0-based) argument, which can be eit…
413 |`InvokeArgument<N>(arg1, arg2, ..., argk)`|Invoke the mock function's `N`-th (0-based) argument, w…
425 In `InvokeArgument<N>(...)`, if an argument needs to be passed by reference, wrap it inside `ByRef(…
429 calls the mock function's #2 argument, passing to it `5` and `string("Hi")` by value, and `foo` by …
445 |`WithArg<N>(a)` |Pass the `N`-th (0-based) argument of the mock function to action `…
453 … | Defines an action `Sum()` to return the sum of the mock function's argument #0 and #1. |
454 … | Defines an action `Plus(n)` to return the sum of the mock function's argument #0 and `n`. |