Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
testing::internal::MatchesRegexMatcher Class Reference

#include <gmock-matchers.h>

Public Member Functions

 MatchesRegexMatcher (const RE *regex, bool full_match)
 
template<typename CharType >
bool MatchAndExplain (CharType *s, MatchResultListener *listener) const
 
template<class MatcheeStringType >
bool MatchAndExplain (const MatcheeStringType &s, MatchResultListener *) const
 
void DescribeTo (::std::ostream *os) const
 
void DescribeNegationTo (::std::ostream *os) const
 

Detailed Description

Definition at line 1547 of file gmock-matchers.h.

Constructor & Destructor Documentation

◆ MatchesRegexMatcher()

testing::internal::MatchesRegexMatcher::MatchesRegexMatcher ( const RE * regex,
bool full_match )
inline

Definition at line 1549 of file gmock-matchers.h.

1550 : regex_(regex), full_match_(full_match) {}

Member Function Documentation

◆ DescribeNegationTo()

void testing::internal::MatchesRegexMatcher::DescribeNegationTo ( ::std::ostream * os) const
inline

Definition at line 1587 of file gmock-matchers.h.

1587 {
1588 *os << "doesn't " << (full_match_ ? "match" : "contain")
1589 << " regular expression ";
1590 UniversalPrinter<std::string>::Print(regex_->pattern(), os);
1591 }
static void Print(const T &value, ::std::ostream *os)
os_t os
Here is the call graph for this function:

◆ DescribeTo()

void testing::internal::MatchesRegexMatcher::DescribeTo ( ::std::ostream * os) const
inline

Definition at line 1581 of file gmock-matchers.h.

1581 {
1582 *os << (full_match_ ? "matches" : "contains")
1583 << " regular expression ";
1584 UniversalPrinter<std::string>::Print(regex_->pattern(), os);
1585 }
Here is the call graph for this function:

◆ MatchAndExplain() [1/2]

template<typename CharType >
bool testing::internal::MatchesRegexMatcher::MatchAndExplain ( CharType * s,
MatchResultListener * listener ) const
inline

Definition at line 1565 of file gmock-matchers.h.

1565 {
1566 return s != NULL && MatchAndExplain(std::string(s), listener);
1567 }
bool MatchAndExplain(CharType *s, MatchResultListener *listener) const
char * s
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatchAndExplain() [2/2]

template<class MatcheeStringType >
bool testing::internal::MatchesRegexMatcher::MatchAndExplain ( const MatcheeStringType & s,
MatchResultListener *  ) const
inline

Definition at line 1574 of file gmock-matchers.h.

1575 {
1576 const std::string& s2(s);
1577 return full_match_ ? RE::FullMatch(s2, *regex_) :
1578 RE::PartialMatch(s2, *regex_);
1579 }
static bool FullMatch(const ::std::string &str, const RE &re)
Here is the call graph for this function:

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