aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/docs
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-10-23 14:09:41 -0400
committerGennadiy Civil <misterg@google.com>2019-10-23 15:54:45 -0400
commit37f322783175a66c11785d17fc153477b0777753 (patch)
tree150b5f66287ef6a7bd1d381e9de61af5b0dea952 /googlemock/docs
parent1110c471cadf9cf40cb735890d67f135d6313471 (diff)
downloadgoogletest-37f322783175a66c11785d17fc153477b0777753.tar.gz
googletest-37f322783175a66c11785d17fc153477b0777753.tar.bz2
googletest-37f322783175a66c11785d17fc153477b0777753.zip
Googletest export
Add a matcher `testing::ReturnRoundRobin` which, on each call, returns the next element in the sequence, restarting at the beginning once it has reached the end. PiperOrigin-RevId: 276312136
Diffstat (limited to 'googlemock/docs')
-rw-r--r--googlemock/docs/cheat_sheet.md21
1 files changed, 11 insertions, 10 deletions
diff --git a/googlemock/docs/cheat_sheet.md b/googlemock/docs/cheat_sheet.md
index 3236e6a9..aafb3b3b 100644
--- a/googlemock/docs/cheat_sheet.md
+++ b/googlemock/docs/cheat_sheet.md
@@ -503,16 +503,17 @@ which must be a permanent callback.
#### Returning a Value
<!-- mdformat off(no multiline tables) -->
-| | |
-| :-------------------------- | :-------------------------------------------- |
-| `Return()` | Return from a `void` mock function. |
-| `Return(value)` | Return `value`. If the type of `value` is different to the mock function's return type, `value` is converted to the latter type <i>at the time the expectation is set</i>, not when the action is executed. |
-| `ReturnArg<N>()` | Return the `N`-th (0-based) argument. |
-| `ReturnNew<T>(a1, ..., ak)` | Return `new T(a1, ..., ak)`; a different object is created each time. |
-| `ReturnNull()` | Return a null pointer. |
-| `ReturnPointee(ptr)` | Return the value pointed to by `ptr`. |
-| `ReturnRef(variable)` | Return a reference to `variable`. |
-| `ReturnRefOfCopy(value)` | Return a reference to a copy of `value`; the copy lives as long as the action. |
+| | |
+| :-------------------------------- | :-------------------------------------------- |
+| `Return()` | Return from a `void` mock function. |
+| `Return(value)` | Return `value`. If the type of `value` is different to the mock function's return type, `value` is converted to the latter type <i>at the time the expectation is set</i>, not when the action is executed. |
+| `ReturnArg<N>()` | Return the `N`-th (0-based) argument. |
+| `ReturnNew<T>(a1, ..., ak)` | Return `new T(a1, ..., ak)`; a different object is created each time. |
+| `ReturnNull()` | Return a null pointer. |
+| `ReturnPointee(ptr)` | Return the value pointed to by `ptr`. |
+| `ReturnRef(variable)` | Return a reference to `variable`. |
+| `ReturnRefOfCopy(value)` | Return a reference to a copy of `value`; the copy lives as long as the action. |
+| `ReturnRoundRobin({a1, ..., ak})` | Each call will return the next `ai` in the list, starting at the beginning when the end of the list is reached. |
<!-- mdformat on -->
#### Side Effects