1 /* 2 * Created by Martin Hořeňovský on 13/10/2019. 3 * 4 * Distributed under the Boost Software License, Version 1.0. (See accompanying 5 * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 */ 7 8 #include "catch_matchers_exception.hpp" 9 10 11 namespace Catch { 12 namespace Matchers { 13 namespace Exception { 14 match(std::exception const & ex) const15bool ExceptionMessageMatcher::match(std::exception const& ex) const { 16 return ex.what() == m_message; 17 } 18 describe() const19std::string ExceptionMessageMatcher::describe() const { 20 return "exception message matches \"" + m_message + "\""; 21 } 22 23 } Message(std::string const & message)24Exception::ExceptionMessageMatcher Message(std::string const& message) { 25 return Exception::ExceptionMessageMatcher(message); 26 } 27 28 // namespace Exception 29 } // namespace Matchers 30 } // namespace Catch 31