Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
7fb047bc
Commit
7fb047bc
authored
Feb 17, 2021
by
Abseil Team
Committed by
Derek Mauro
Feb 18, 2021
Browse files
Googletest export
Explain how to wrap matchers. PiperOrigin-RevId: 357901293
parent
58937787
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
docs/gmock_cheat_sheet.md
docs/gmock_cheat_sheet.md
+8
-0
No files found.
docs/gmock_cheat_sheet.md
View file @
7fb047bc
...
@@ -477,6 +477,14 @@ which must be a permanent callback.
...
@@ -477,6 +477,14 @@ which must be a permanent callback.
being matched and the matcher parameters).
being matched and the matcher parameters).
3.
You can use
`PrintToString(x)`
to convert a value
`x`
of any type to a
3.
You can use
`PrintToString(x)`
to convert a value
`x`
of any type to a
string.
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}
## Actions {#ActionList}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment