123456789101112131415161718192021222324252627282930 |
- #include "catch_matchers_exception.hpp"
- namespace Catch {
- namespace Matchers {
- namespace Exception {
- bool ExceptionMessageMatcher::match(std::exception const& ex) const {
- return ex.what() == m_message;
- }
- std::string ExceptionMessageMatcher::describe() const {
- return "exception message matches \"" + m_message + "\"";
- }
- }
- Exception::ExceptionMessageMatcher Message(std::string const& message) {
- return Exception::ExceptionMessageMatcher(message);
- }
- }
- }
|