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 #ifndef TWOBLUECUBES_CATCH_MATCHERS_EXCEPTION_HPP_INCLUDED
8 #define TWOBLUECUBES_CATCH_MATCHERS_EXCEPTION_HPP_INCLUDED
9 
10 #include "catch_matchers.h"
11 
12 namespace Catch {
13 namespace Matchers {
14 namespace Exception {
15 
16 class ExceptionMessageMatcher : public MatcherBase<std::exception> {
17     std::string m_message;
18 public:
19 
ExceptionMessageMatcher(std::string const & message)20     ExceptionMessageMatcher(std::string const& message):
21         m_message(message)
22     {}
23 
24     bool match(std::exception const& ex) const override;
25 
26     std::string describe() const override;
27 };
28 
29 } // namespace Exception
30 
31 Exception::ExceptionMessageMatcher Message(std::string const& message);
32 
33 } // namespace Matchers
34 } // namespace Catch
35 
36 #endif // TWOBLUECUBES_CATCH_MATCHERS_EXCEPTION_HPP_INCLUDED
37