17class FailWith :
public MatcherBase<A, std::string> {
19 static_assert(is_result_v<A>,
".fail_with() must be matched against a Result.");
22 std::string verb()
override {
return "fail with"; }
23 std::string
description()
override {
return std::format(R
"(fail with "{}")", this->expected()); }
25 bool match()
override {
26 auto message = this->actual().get_message();
27 return this->actual().is_failure() && message == this->expected();