summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/gmock_cheat_sheet.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/gmock_cheat_sheet.md b/docs/gmock_cheat_sheet.md
index b05c8a57..c82d9cc0 100644
--- a/docs/gmock_cheat_sheet.md
+++ b/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}
OpenPOWER on IntegriCloud