summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-09-06 19:54:21 (GMT)
committerShaindel Schwartz <shaindel@google.com>2019-09-09 17:40:33 (GMT)
commit62a109a2ffe68bf8050d5662e8406d631b44044a (patch)
treeb66b7b8a67a9547987a4fcf9270ca95afdc2a270
parentc2b2cd8883f51184a28491f1d8fcb248b0bf0d65 (diff)
downloadgoogletest-62a109a2ffe68bf8050d5662e8406d631b44044a.zip
googletest-62a109a2ffe68bf8050d5662e8406d631b44044a.tar.gz
googletest-62a109a2ffe68bf8050d5662e8406d631b44044a.tar.bz2
Googletest export
...text exposed to GitHub repo https://www.github.com/google/googletest PiperOrigin-RevId: 267654546
-rw-r--r--googlemock/docs/cheat_sheet.md13
1 files changed, 12 insertions, 1 deletions
diff --git a/googlemock/docs/cheat_sheet.md b/googlemock/docs/cheat_sheet.md
index a79c4c8..cb7d258 100644
--- a/googlemock/docs/cheat_sheet.md
+++ b/googlemock/docs/cheat_sheet.md
@@ -202,6 +202,15 @@ EXPECT_CALL(mock-object, method (matchers)?)
.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
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 -->
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