Lines Matching refs:argument
66 convention as the first argument to the macro. For example,
149 A **matcher** matches a _single_ argument. You can use it inside
157 Built-in matchers (where `argument` is the function argument) are
161 |`_`|`argument` can be any value of the correct type.|
163 |`A<type>()` or `An<type>()`|`argument` can be any value of type `type`. |
167 |`Eq(value)` or `value`|`argument == value`|
169 |`Ge(value)` |`argument >= value`|
170 |`Gt(value)` |`argument > value` |
171 |`Le(value)` |`argument <= value`|
172 |`Lt(value)` |`argument < value` |
173 |`Ne(value)` |`argument != value`|
174 |`IsNull()` |`argument` is a `NULL` pointer (raw or smart).|
175 |`NotNull()` |`argument` is a non-null pointer (raw or smart).|
176 |`Ref(variable)` |`argument` is a reference to `variable`.|
177 |`TypedEq<type>(value)`|`argument` has type `type` and is equal to `value`. You may need to use thi…
188 |`DoubleEq(a_double)`|`argument` is a `double` value approximately equal to `a_double`, treating tw…
190 |`FloatEq(a_float)` |`argument` is a `float` value approximately equal to `a_float`, treating two …
191 |`NanSensitiveDoubleEq(a_double)`|`argument` is a `double` value approximately equal to `a_double`,…
192 |`NanSensitiveFloatEq(a_float)`|`argument` is a `float` value approximately equal to `a_float`, tre…
204 The `argument` can be either a C string or a C++ string object:
206 |`ContainsRegex(string)`|`argument` matches the given regular expression.|
208 |`EndsWith(suffix)` |`argument` ends with string `suffix`. |
209 |`HasSubstr(string)` |`argument` contains `string` as a sub-string. |
210 |`MatchesRegex(string)` |`argument` matches the given regular expression with the match starting at…
211 |`StartsWith(prefix)` |`argument` starts with string `prefix`. |
212 |`StrCaseEq(string)` |`argument` is equal to `string`, ignoring case. |
213 |`StrCaseNe(string)` |`argument` is not equal to `string`, ignoring case.|
214 |`StrEq(string)` |`argument` is equal to `string`. |
215 |`StrNe(string)` |`argument` is not equal to `string`. |
227 | `Contains(e)` | `argument` contains an element that matches `e`, which can be either a value or a…
229 |`ElementsAre(e0, e1, ..., en)`|`argument` has `n + 1` elements, where the i-th element matches `ei…
236 …nter and a count (e.g. in `Bar(const T* buffer, int len)` -- see [Multi-argument Matchers](#Multia…
242 …(&class::field, m)`|`argument.field` (or `argument->field` when `argument` is a plain pointer) mat…
244 |`Key(e)` |`argument.first` matches `e`, which can be either a value or a matcher. …
245 |`Pair(m1, m2)` |`argument` is an `std::pair` whose `first` field matches `m1` and `secon…
246 …:property, m)`|`argument.property()` (or `argument->property()` when `argument` is a plain pointer…
250 |`ResultOf(f, m)`|`f(argument)` matches matcher `m`, where `f` is a function or functor.|
255 |`Pointee(m)`|`argument` (either a smart pointer or a raw pointer) points to a value that matches m…
283 |`AllOf(m1, m2, ..., mn)`|`argument` matches all of the matchers `m1` to `mn`.|
285 |`AnyOf(m1, m2, ..., mn)`|`argument` matches at least one of the matchers `m1` to `mn`.|
286 |`Not(m)` |`argument` doesn't match matcher `m`. |
293 |`Truly(predicate)` |`predicate(argument)` returns something considered by C++ to be true, where `p…
297 |`Matches(m)`|a unary functor that returns `true` if the argument matches `m`.|
330 |`ReturnArg<N>()`|Return the `N`-th (0-based) argument.|
339 | `DeleteArg<N>()` | Delete the `N`-th (0-based) argument, which must be a pointer. |
340 | `SaveArg<N>(pointer)` | Save the `N`-th (0-based) argument to `*pointer`. |
341 …ArgReferee<N>(value)` | Assign value to the variable referenced by the `N`-th (0-based) argument. |
342 …rgumentPointee<N>(value)`|Assign `value` to the variable pointed by the `N`-th (0-based) argument.|
343 …range [`first`, `last`) to the array pointed to by the `N`-th (0-based) argument, which can be eit…
354 |`InvokeArgument<N>(arg1, arg2, ..., argk)`|Invoke the mock function's `N`-th (0-based) argument, w…
366 In `InvokeArgument<N>(...)`, if an argument needs to be passed by reference, wrap it inside `ByRef(…
370 calls the mock function's #2 argument, passing to it `5` and `string("Hi")` by value, and `foo` by …
384 |`WithArg<N>(a)` |Pass the `N`-th (0-based) argument of the mock function to action `a` and…
390 …arg1; }` | Defines an action `Sum()` to return the sum of the mock function's argument #0 and #1. |
392 …n; }` | Defines an action `Plus(n)` to return the sum of the mock function's argument #0 and `n`. |