Commit 46734d9a authored by Vladimir Goncharov's avatar Vladimir Goncharov
Browse files

Small improvements: code style and property name

parent 9ac4cd0f
......@@ -4843,7 +4843,7 @@ ThrowsMessage(const MessageMatcher& messageMatcher) {
// literals, e.g. ThrowsMessage("message").
return MakePolymorphicMatcher(
internal::ExceptionMatcherImpl<Err>{
Property("description", &std::exception::what,
Property("what", &std::exception::what,
MatcherCast<std::string>(messageMatcher))});
}
template <typename Err, typename Message = std::string>
......@@ -4854,7 +4854,7 @@ ThrowsMessageHasSubstr(const internal::StringLike<Message>& message) {
"expected an std::exception-derived class");
return MakePolymorphicMatcher(
internal::ExceptionMatcherImpl<Err>{
Property("description", &std::exception::what, HasSubstr(message))});
Property("what", &std::exception::what, HasSubstr(message))});
}
#endif // GTEST_HAS_EXCEPTIONS
......
......@@ -8282,10 +8282,8 @@ TEST(ThrowsPredicateCompilesTest, StringLikeMessage) {
std::string inner;
// Note: explicit conversion.
explicit operator std::string() const {
return inner;
}
};
explicit operator std::string() const { return inner; }
};
Matcher<void (*)()> matcher = ThrowsMessageHasSubstr<std::runtime_error>(
SomeCustomString{"error message"});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment