Googletest export
...text exposed to GitHub repo https://www.github.com/google/googletest PiperOrigin-RevId: 267654546
This commit is contained in:
parent
9a3d570dd7
commit
70c06dd2a8
|
@ -202,6 +202,15 @@ EXPECT_CALL(mock-object, method (matchers)?)
|
||||||
.RetiresOnSaturation(); ?
|
.RetiresOnSaturation(); ?
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For each item above, `?` means it can be used at most once, while `*` means it
|
||||||
|
can be used any number of times.
|
||||||
|
|
||||||
|
In order to pass, `EXPECT_CALL` must be used before the calls are actually made.
|
||||||
|
|
||||||
|
The `(matchers)` is a comma-separated list of matchers that correspond to each
|
||||||
|
of the arguments of `method`, and sets the expectation only for calls of
|
||||||
|
`method` that matches all of the matchers.
|
||||||
|
|
||||||
If `(matchers)` is omitted, the expectation is the same as if the matchers were
|
If `(matchers)` is omitted, the expectation is the same as if the matchers were
|
||||||
set to anything matchers (for example, `(_, _, _, _)` for a four-arg method).
|
set to anything matchers (for example, `(_, _, _, _)` for a four-arg method).
|
||||||
|
|
||||||
|
@ -231,7 +240,9 @@ A **matcher** matches a *single* argument. You can use it inside `ON_CALL()` or
|
||||||
<!-- mdformat on -->
|
<!-- mdformat on -->
|
||||||
|
|
||||||
Built-in matchers (where `argument` is the function argument, e.g.
|
Built-in matchers (where `argument` is the function argument, e.g.
|
||||||
`actual_value` in the example above) are divided into several categories:
|
`actual_value` in the example above, or when used in the context of
|
||||||
|
`EXPECT_CALL(mock_object, method(matchers))`, the arguments of `method`) are
|
||||||
|
divided into several categories:
|
||||||
|
|
||||||
#### Wildcard
|
#### Wildcard
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user