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

#include <catch.hpp>

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

Public Member Functions

 Contains (std::string const &substr, CaseSensitive::Choice caseSensitivity=CaseSensitive::Yes)
 
 Contains (Contains const &other)
 
virtual ~Contains ()
 
virtual bool match (std::string const &expr) const
 
virtual std::string toString () const
 
- Public Member Functions inherited from Catch::Matchers::Impl::MatcherImpl< Contains, 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 1090 of file catch.hpp.

Constructor & Destructor Documentation

◆ Contains() [1/2]

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

Definition at line 1091 of file catch.hpp.

1092  : m_data( substr, caseSensitivity ){}

◆ Contains() [2/2]

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

Definition at line 1093 of file catch.hpp.

1093 : m_data( other.m_data ){}

◆ ~Contains()

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

Member Function Documentation

◆ match()

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

Definition at line 1097 of file catch.hpp.

1097  {
1098  return m_data.adjustString( expr ).find( m_data.m_str ) != std::string::npos;
1099  }
std::string adjustString(std::string const &str) const
Definition: catch.hpp:1056

◆ toString()

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

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

Definition at line 1100 of file catch.hpp.

1100  {
1101  return "contains: \"" + m_data.m_str + "\"" + m_data.toStringSuffix();
1102  }

Field Documentation

◆ m_data

CasedString Catch::Matchers::Impl::StdString::Contains::m_data

Definition at line 1104 of file catch.hpp.


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