Public Member Functions | Private Attributes | List of all members
cet::exception_message_matcher Class Reference

#include <exception_message_matcher.h>

Inheritance diagram for cet::exception_message_matcher:

Public Member Functions

 exception_message_matcher (Catch::Matchers::StdString::EqualsMatcher const &matcher)
 
 exception_message_matcher (Catch::Matchers::StdString::ContainsMatcher const &matcher)
 
 exception_message_matcher (Catch::Matchers::StdString::StartsWithMatcher const &matcher)
 
 exception_message_matcher (Catch::Matchers::StdString::EndsWithMatcher const &matcher)
 
 exception_message_matcher (Catch::Matchers::StdString::RegexMatcher const &matcher)
 
bool match (cet::exception const &e) const override
 
std::string describe () const override
 

Private Attributes

std::shared_ptr< Catch::StringMatcher > matcher_
 
std::string description_
 

Detailed Description

Definition at line 25 of file exception_message_matcher.h.

Constructor & Destructor Documentation

cet::exception_message_matcher::exception_message_matcher ( Catch::Matchers::StdString::EqualsMatcher const &  matcher)
inline

Definition at line 28 of file exception_message_matcher.h.

30  : matcher_{std::make_shared<Catch::Matchers::StdString::EqualsMatcher>(
31  matcher)}
32  , description_{matcher.describe()}
33  {}
std::shared_ptr< Catch::StringMatcher > matcher_
cet::exception_message_matcher::exception_message_matcher ( Catch::Matchers::StdString::ContainsMatcher const &  matcher)
inline

Definition at line 35 of file exception_message_matcher.h.

37  : matcher_{std::make_shared<Catch::Matchers::StdString::ContainsMatcher>(
38  matcher)}
39  , description_{matcher.describe()}
40  {}
std::shared_ptr< Catch::StringMatcher > matcher_
cet::exception_message_matcher::exception_message_matcher ( Catch::Matchers::StdString::StartsWithMatcher const &  matcher)
inline

Definition at line 42 of file exception_message_matcher.h.

44  : matcher_{std::make_shared<Catch::Matchers::StdString::StartsWithMatcher>(
45  matcher)}
46  , description_{matcher.describe()}
47  {}
std::shared_ptr< Catch::StringMatcher > matcher_
cet::exception_message_matcher::exception_message_matcher ( Catch::Matchers::StdString::EndsWithMatcher const &  matcher)
inline

Definition at line 49 of file exception_message_matcher.h.

51  : matcher_{std::make_shared<Catch::Matchers::StdString::EndsWithMatcher>(
52  matcher)}
53  , description_{matcher.describe()}
54  {}
std::shared_ptr< Catch::StringMatcher > matcher_
cet::exception_message_matcher::exception_message_matcher ( Catch::Matchers::StdString::RegexMatcher const &  matcher)
inline

Definition at line 56 of file exception_message_matcher.h.

58  : matcher_{std::make_shared<Catch::Matchers::StdString::RegexMatcher>(
59  matcher)}
60  , description_{matcher.describe()}
61  {}
std::shared_ptr< Catch::StringMatcher > matcher_

Member Function Documentation

std::string cet::exception_message_matcher::describe ( ) const
inlineoverride

Definition at line 70 of file exception_message_matcher.h.

71  {
72  return description_;
73  }
bool cet::exception_message_matcher::match ( cet::exception const &  e) const
inlineoverride

Definition at line 64 of file exception_message_matcher.h.

65  {
66  return matcher_->match(e.what());
67  }
std::shared_ptr< Catch::StringMatcher > matcher_
const double e

Member Data Documentation

std::string cet::exception_message_matcher::description_
private

Definition at line 77 of file exception_message_matcher.h.

std::shared_ptr<Catch::StringMatcher> cet::exception_message_matcher::matcher_
private

Definition at line 76 of file exception_message_matcher.h.


The documentation for this class was generated from the following file: