diff options
author | Abseil Team <absl-team@google.com> | 2020-10-13 15:14:28 (GMT) |
---|---|---|
committer | Derek Mauro <dmauro@google.com> | 2020-10-14 22:25:49 (GMT) |
commit | d4df326d6fb0e76dee01d639dd0684c6537e0f8a (patch) | |
tree | e8d8427d6b4798a248ef2227e41741f305270adf /googlemock/docs | |
parent | d11c76175f24f23a1fd316fe37d3743133479e27 (diff) | |
download | googletest-d4df326d6fb0e76dee01d639dd0684c6537e0f8a.zip googletest-d4df326d6fb0e76dee01d639dd0684c6537e0f8a.tar.gz googletest-d4df326d6fb0e76dee01d639dd0684c6537e0f8a.tar.bz2 |
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.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/googlemock/docs/cheat_sheet.md b/googlemock/docs/cheat_sheet.md index cc7e699..78871bf 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:** |