summaryrefslogtreecommitdiff
path: root/googlemock/docs
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2020-10-13 11:14:28 -0400
committerDerek Mauro <dmauro@google.com>2020-10-14 18:25:49 -0400
commitd4df326d6fb0e76dee01d639dd0684c6537e0f8a (patch)
treee8d8427d6b4798a248ef2227e41741f305270adf /googlemock/docs
parentd11c76175f24f23a1fd316fe37d3743133479e27 (diff)
downloadgoogletest-git-d4df326d6fb0e76dee01d639dd0684c6537e0f8a.tar.gz
Googletest export
Use absl::StrCat in MATCHER_P example for consistency with https://abseil.io/tips/3 PiperOrigin-RevId: 336878481
Diffstat (limited to 'googlemock/docs')
-rw-r--r--googlemock/docs/cheat_sheet.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/googlemock/docs/cheat_sheet.md b/googlemock/docs/cheat_sheet.md
index cc7e699b..78871bf8 100644
--- a/googlemock/docs/cheat_sheet.md
+++ b/googlemock/docs/cheat_sheet.md
@@ -498,7 +498,7 @@ which must be a permanent callback.
| :----------------------------------- | :------------------------------------ |
| `MATCHER(IsEven, "") { return (arg % 2) == 0; }` | Defines a matcher `IsEven()` to match an even number. |
| `MATCHER_P(IsDivisibleBy, n, "") { *result_listener << "where the remainder is " << (arg % n); return (arg % n) == 0; }` | Defines a matcher `IsDivisibleBy(n)` to match a number divisible by `n`. |
-| `MATCHER_P2(IsBetween, a, b, std::string(negation ? "isn't" : "is") + " between " + PrintToString(a) + " and " + PrintToString(b)) { return a <= arg && arg <= b; }` | Defines a matcher `IsBetween(a, b)` to match a value in the range [`a`, `b`]. |
+| `MATCHER_P2(IsBetween, a, b, absl::StrCat(negation ? "isn't" : "is", " between ", PrintToString(a), " and ", PrintToString(b))) { return a <= arg && arg <= b; }` | Defines a matcher `IsBetween(a, b)` to match a value in the range [`a`, `b`]. |
<!-- mdformat on -->
**Notes:**