Googletest export

Ensure `.what()` is printed in `ThrowsMessage(...)` to address https://github.com/google/googletest/issues/3582

Closes #3582

PiperOrigin-RevId: 399462851
This commit is contained in:
Abseil Team
2021-09-28 12:50:05 -04:00
committed by CJ Johnson
parent e4717df71a
commit ab36804e42
2 changed files with 8 additions and 10 deletions

View File

@@ -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);
}