Lines Matching defs:Matcher

75 //   2. a factory function that creates a Matcher<T> object from a
224 // An internal class for implementing Matcher<T>, which will derive
225 // from it. We put functionalities common to all Matcher<T>
458 // A Matcher<T> is a copyable and IMMUTABLE (except by assignment)
460 // implementation of Matcher<T> is just a std::shared_ptr to const
461 // MatcherInterface<T>. Don't inherit from Matcher!
463 class Matcher : public internal::MatcherBase<T> {
465 // Constructs a null matcher. Needed for storing Matcher objects in STL
468 explicit Matcher() {} // NOLINT
471 explicit Matcher(const MatcherInterface<const T&>* impl)
475 explicit Matcher(
483 Matcher(M&& m) : internal::MatcherBase<T>(std::forward<M>(m)) {} // NOLINT
487 Matcher(T value); // NOLINT
494 class GTEST_API_ Matcher<const std::string&>
497 Matcher() = default;
499 explicit Matcher(const MatcherInterface<const std::string&>* impl)
504 Matcher(M&& m) // NOLINT
509 Matcher(const std::string& s); // NOLINT
512 Matcher(const char* s); // NOLINT
516 class GTEST_API_ Matcher<std::string>
519 Matcher() = default;
521 explicit Matcher(const MatcherInterface<const std::string&>* impl)
523 explicit Matcher(const MatcherInterface<std::string>* impl)
528 Matcher(M&& m) // NOLINT
533 Matcher(const std::string& s); // NOLINT
536 Matcher(const char* s); // NOLINT
544 class GTEST_API_ Matcher<const internal::StringView&>
547 Matcher() = default;
549 explicit Matcher(const MatcherInterface<const internal::StringView&>* impl)
554 Matcher(M&& m) // NOLINT
560 Matcher(const std::string& s); // NOLINT
563 Matcher(const char* s); // NOLINT
566 Matcher(internal::StringView s); // NOLINT
570 class GTEST_API_ Matcher<internal::StringView>
573 Matcher() = default;
575 explicit Matcher(const MatcherInterface<const internal::StringView&>* impl)
577 explicit Matcher(const MatcherInterface<internal::StringView>* impl)
582 Matcher(M&& m) // NOLINT
587 Matcher(const std::string& s); // NOLINT
590 Matcher(const char* s); // NOLINT
593 Matcher(internal::StringView s); // NOLINT
599 std::ostream& operator<<(std::ostream& os, const Matcher<T>& matcher) {
630 operator Matcher<T>() const {
631 return Matcher<T>(new MonomorphicImpl<const T&>(impl_));
659 // Matcher<T>(new MyMatcherImpl<const T&>(...));
661 // MakeMatcher may create a Matcher that accepts its argument by value, which
664 inline Matcher<T> MakeMatcher(const MatcherInterface<T>* impl) {
665 return Matcher<T>(impl);
781 // ContainsRegex(regex), which can be used as a Matcher<T> as long as
866 // Constructs a Matcher<T> from a 'value' of type T. The constructed
869 Matcher<T>::Matcher(T value) {
877 // TypedEq<T>(x) is just a convenient short-hand for Matcher<T>(Eq(x))
878 // or Matcher<T>(x), but more readable than the latter.
883 // can always write Matcher<T>(Lt(5)) to be explicit about the type,
886 inline Matcher<Lhs> TypedEq(const Rhs& rhs) {