ManaPlus
Public Member Functions | Data Fields
Catch::Matchers::Impl::StdString::EndsWith Struct Reference

#include <catch.hpp>

Inheritance diagram for Catch::Matchers::Impl::StdString::EndsWith:
Catch::Matchers::Impl::MatcherImpl< EndsWith, std::string > Catch::Matchers::Impl::Matcher< ExpressionT > Catch::SharedImpl< IShared > Catch::IShared Catch::NonCopyable

Public Member Functions

 EndsWith (std::string const &substr, CaseSensitive::Choice caseSensitivity=CaseSensitive::Yes)
 
 EndsWith (EndsWith const &other)
 
virtual ~EndsWith ()
 
virtual bool match (std::string const &expr) const
 
virtual std::string toString () const
 
- Public Member Functions inherited from Catch::Matchers::Impl::MatcherImpl< EndsWith, std::string >
virtual Ptr< Matcher< std::string > > clone () const
 
- Public Member Functions inherited from Catch::Matchers::Impl::Matcher< ExpressionT >
virtual ~Matcher ()
 
virtual bool match (ExpressionT const &expr) const =0
 
Generic::AllOf< ExpressionT > operator&& (Matcher< ExpressionT > const &other) const
 
Generic::AnyOf< ExpressionT > operator|| (Matcher< ExpressionT > const &other) const
 
Generic::Not< ExpressionT > operator! () const
 
- Public Member Functions inherited from Catch::SharedImpl< IShared >
 SharedImpl ()
 
virtual void addRef () const
 
virtual void release () const
 
- Public Member Functions inherited from Catch::IShared
virtual ~IShared ()
 

Data Fields

CasedString m_data
 
- Data Fields inherited from Catch::SharedImpl< IShared >
unsigned int m_rc
 

Additional Inherited Members

- Public Types inherited from Catch::Matchers::Impl::Matcher< ExpressionT >
typedef ExpressionT ExpressionType
 
- Protected Member Functions inherited from Catch::NonCopyable
 NonCopyable ()
 
virtual ~NonCopyable ()
 

Detailed Description

Definition at line 1125 of file catch.hpp.

Constructor & Destructor Documentation

◆ EndsWith() [1/2]

Catch::Matchers::Impl::StdString::EndsWith::EndsWith ( std::string const &  substr,
CaseSensitive::Choice  caseSensitivity = CaseSensitive::Yes 
)
inline

Definition at line 1126 of file catch.hpp.

1127  : m_data( substr, caseSensitivity ){}

◆ EndsWith() [2/2]

Catch::Matchers::Impl::StdString::EndsWith::EndsWith ( EndsWith const &  other)
inline

Definition at line 1128 of file catch.hpp.

1128 : m_data( other.m_data ){}

◆ ~EndsWith()

virtual Catch::Matchers::Impl::StdString::EndsWith::~EndsWith ( )
virtual

Member Function Documentation

◆ match()

virtual bool Catch::Matchers::Impl::StdString::EndsWith::match ( std::string const &  expr) const
inlinevirtual

Definition at line 1132 of file catch.hpp.

1132  {
1133  return endsWith( m_data.adjustString( expr ), m_data.m_str );
1134  }
bool endsWith(std::string const &s, std::string const &suffix)
std::string adjustString(std::string const &str) const
Definition: catch.hpp:1056

References Catch::endsWith().

◆ toString()

virtual std::string Catch::Matchers::Impl::StdString::EndsWith::toString ( ) const
inlinevirtual

Implements Catch::Matchers::Impl::Matcher< ExpressionT >.

Definition at line 1135 of file catch.hpp.

1135  {
1136  return "ends with: \"" + m_data.m_str + "\"" + m_data.toStringSuffix();
1137  }

Field Documentation

◆ m_data

CasedString Catch::Matchers::Impl::StdString::EndsWith::m_data

Definition at line 1139 of file catch.hpp.


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