Electroneum
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 1326 of file gmock-matchers.h.

Constructor & Destructor Documentation

◆ MatchesRegexMatcher()

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

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

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

Member Function Documentation

◆ DescribeNegationTo()

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

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

1359 {
1360 *os << "doesn't " << (full_match_ ? "match" : "contain")
1361 << " regular expression ";
1362 UniversalPrinter<internal::string>::Print(regex_->pattern(), os);
1363 }
static void Print(const T &value, ::std::ostream *os)
Here is the call graph for this function:

◆ DescribeTo()

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

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

1353 {
1354 *os << (full_match_ ? "matches" : "contains")
1355 << " regular expression ";
1356 UniversalPrinter<internal::string>::Print(regex_->pattern(), os);
1357 }
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 1337 of file gmock-matchers.h.

1337 {
1338 return s != NULL && MatchAndExplain(internal::string(s), listener);
1339 }
bool MatchAndExplain(CharType *s, MatchResultListener *listener) const
::std::string string
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 1346 of file gmock-matchers.h.

1347 {
1348 const internal::string& s2(s);
1349 return full_match_ ? RE::FullMatch(s2, *regex_) :
1350 RE::PartialMatch(s2, *regex_);
1351 }
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:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/external/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h