Googletest export

Explain how to wrap matchers.

PiperOrigin-RevId: 357901293
pull/3284/head
Abseil Team 4 years ago committed by Derek Mauro
parent 5893778716
commit 7fb047bca3
  1. 8
      docs/gmock_cheat_sheet.md

@ -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…
Cancel
Save