You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are more requests for this, so it might happen.
The question is, what the API should be like... the obvious option would be REQUIRE_THROWS_WITH_AS(expr, exception-type, matcher), but the name might not be a good idea and I am not sure whether the API couldn't be better if done differently.
At first I was going to suggest changing the second arg from exception type to matcher, plus the ability to pass an exception object instead, as in REQUIRE_THROWS_AS(stuff(), std::runtime_error("failed")) (which would construct what()-equality matcher), but that would probably be both more difficult to implement pre-C++11 and break existing code.
It would be nice to have a macro that combines
REQUIRE_THROWS_AS
andREQUIRE_THROWS_WITH
allowing to check the exception type and message in one go.The text was updated successfully, but these errors were encountered: