diff options
author | Abseil Team <absl-team@google.com> | 2021-09-28 16:50:05 (GMT) |
---|---|---|
committer | CJ Johnson <johnsoncj@google.com> | 2021-09-28 20:33:40 (GMT) |
commit | ab36804e42d4cb85b7e7fe9946928597840684db (patch) | |
tree | fea34ceaee0a3e33e9546b2126386071ee876a82 /googlemock/include/gmock | |
parent | e4717df71a4f45bf9f0ac88c6cd9846a0bc248dd (diff) | |
download | googletest-ab36804e42d4cb85b7e7fe9946928597840684db.zip googletest-ab36804e42d4cb85b7e7fe9946928597840684db.tar.gz googletest-ab36804e42d4cb85b7e7fe9946928597840684db.tar.bz2 |
Googletest export
Ensure `.what()` is printed in `ThrowsMessage(...)` to address https://github.com/google/googletest/issues/3582
Closes #3582
PiperOrigin-RevId: 399462851
Diffstat (limited to 'googlemock/include/gmock')
-rw-r--r-- | googlemock/include/gmock/gmock-matchers.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index d5bd4a9..0e4aa0b 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -5266,7 +5266,8 @@ class WithWhatMatcherImpl { template <typename Err> bool MatchAndExplain(const Err& err, MatchResultListener* listener) const { - *listener << "which contains .what() that "; + *listener << "which contains .what() (of value = " << err.what() + << ") that "; return matcher_.MatchAndExplain(err.what(), listener); } |