mirror of
https://github.com/google/googletest.git
synced 2024-12-27 02:01:25 +08:00
Googletest export
Explain how to wrap matchers. PiperOrigin-RevId: 357901293
This commit is contained in:
parent
5893778716
commit
7fb047bca3
@ -477,6 +477,14 @@ which must be a permanent callback.
|
||||
being matched and the matcher parameters).
|
||||
3. You can use `PrintToString(x)` to convert a value `x` of any type to a
|
||||
string.
|
||||
4. You can use `ExplainMatchResult()` in a custom matcher to wrap another
|
||||
matcher, for example:
|
||||
|
||||
```cpp
|
||||
MATCHER_P(NestedPropertyMatches, matcher, "") {
|
||||
return ExplainMatchResult(matcher, arg.nested().property(), result_listener);
|
||||
}
|
||||
```
|
||||
|
||||
## Actions {#ActionList}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user