Home | History | Annotate | Download | only in gmock

Lines Matching defs:Matches

68 // used by a matcher to explain why a value matches or doesn't match.
114 // Returns true iff the matcher matches x; also explains the match
193 // Returns true iff the matcher matches x; also explains the match
199 // Returns true iff this matcher matches x.
200 bool Matches(T x) const {
213 // Explains why x matches, or doesn't match, the matcher.
246 // object that can check whether a value of type T matches. The
556 // A<T>() returns a matcher that matches any value of type T.
582 // Matches the value against the given matcher, prints the value and explains
593 return matcher.Matches(value);
615 // TuplePrefix<N>::Matches(matcher_tuple, value_tuple) returns true
616 // iff the first N fields of matcher_tuple matches the first N
619 static bool Matches(const MatcherTuple& matcher_tuple,
622 return TuplePrefix<N - 1>::Matches(matcher_tuple, value_tuple)
623 && get<N - 1>(matcher_tuple).Matches(get<N - 1>(value_tuple));
670 static bool Matches(const MatcherTuple& /* matcher_tuple */,
696 Matches(matcher_tuple, value_tuple);
721 *os << "never matches";
725 // Implements _, a matcher that matches any value of any
793 // Implements the polymorphic IsNull() matcher, which matches any raw or smart
809 // Implements the polymorphic NotNull() matcher, which matches any raw or smart
825 // Ref(variable) matches any argument that is a reference to
1010 // Describes what this matcher matches.
1118 // true iff s matches regular expression regex. When full_match_ is
1132 *os << (full_match_ ? "matches" : "contains")
1232 // Implements the Not(m) matcher, which matches a value that doesn't
1316 // matches a value that matches all of the matchers m_1, ..., and m_n.
1366 // If either matcher1_ or matcher2_ matches x, we just need to
1367 // explain why *one* of them matches.
1403 // matches a value that matches at least one of the matchers m_1, ...,
1466 // Used for implementing Matches(matcher), which turns a matcher into
1473 // This template operator() allows Matches(m) to be used as a
1478 // Matches(Ref(n))(x)).
1483 // allows us to write Matches(m) where m is a polymorphic matcher
1486 // If we write Matcher<T>(matcher_).Matches(x) here, it won't
1488 // Matcher<const T&>(matcher_).Matches(x) here, it won't compile
1490 // matcher_.Matches(x), it won't compile when matcher_ is
1495 return MatcherCast<const T&>(matcher_).Matches(x);
1554 // matches two float values using ULP-based approximation. The
1596 *os << "never matches";
1654 // pointee matches matcher m. The pointer can be either raw or smart.
2071 return matcher_.Matches(sorted_container);
2187 if (!mono_tuple_matcher_.Matches(value_pair))
2226 // * Any element in the container matches, if !all_elements_should_match.
2235 const bool matches = inner_matcher_.MatchAndExplain(*it, &inner_listener);
2237 if (matches != all_elements_should_match) {
2239 << (matches ? " matches" : " doesn't match");
2346 // Key(inner_matcher) matches an std::pair whose 'first' field matches
2361 // Returns true iff 'key_value.first' (the key) matches the inner matcher.
2442 // Returns true iff 'a_pair.first' matches first_matcher and 'a_pair.second'
2443 // matches second_matcher.
2449 return first_matcher_.Matches(a_pair.first) &&
2450 second_matcher_.Matches(a_pair.second);
2605 // Every element matches its expectation. We need to explain why
2614 *listener << "whose element #" << i << " matches, " << s;
2683 // _ is a matcher that matches anything of any type.
2693 // Creates a matcher that matches any value of the given type T.
2697 // Creates a matcher that matches any value of the given type T.
2701 // Creates a polymorphic matcher that matches anything equal to x.
2708 // matcher matches any value that's equal to 'value'.
2712 // Creates a monomorphic matcher that matches anything with type Lhs
2727 // Creates a polymorphic matcher that matches anything >= x.
2733 // Creates a polymorphic matcher that matches anything > x.
2739 // Creates a polymorphic matcher that matches anything <= x.
2745 // Creates a polymorphic matcher that matches anything < x.
2751 // Creates a polymorphic matcher that matches anything != x.
2757 // Creates a polymorphic matcher that matches any NULL pointer.
2762 // Creates a polymorphic matcher that matches any non-NULL pointer.
2769 // Creates a polymorphic matcher that matches any argument that
2776 // Creates a matcher that matches any double argument approximately
2782 // Creates a matcher that matches any double argument approximately
2788 // Creates a matcher that matches any float argument approximately
2794 // Creates a matcher that matches
2800 // Creates a matcher that matches a pointer (raw or smart) that points
2801 // to a value that matches inner_matcher.
2808 // Creates a matcher that matches an object whose given field matches
2811 // matches a Foo object x iff x.number >= 5.
2825 // Creates a matcher that matches an object whose given property
2826 // matches 'matcher'. For example,
2828 // matches a Foo object x iff x.str() starts with "hi".
2843 // Creates a matcher that matches an object iff the result of applying
2844 // a callable to x matches 'matcher'.
2847 // matches a Foo object x iff f(x) starts with "hi".
2871 // Matches a string equal to str.
2878 // Matches a string not equal to str.
2885 // Matches a string equal to str, ignoring case.
2892 // Matches a string not equal to str, ignoring case.
2899 // Creates a matcher that matches any string, std::string, or C string
2907 // Matches a string that starts with 'prefix' (case-sensitive).
2914 // Matches a string that ends with 'suffix' (case-sensitive).
2921 // Matches a string that fully matches regular expression 'regex'.
2932 // Matches a string that contains regular expression 'regex'.
2946 // Matches a string equal to str.
2953 // Matches a string not equal to str.
2960 // Matches a string equal to str, ignoring case.
2967 // Matches a string not equal to str, ignoring case.
2974 // Creates a matcher that matches any wstring, std::wstring, or C wide string
2982 // Matches a string that starts with 'prefix' (case-sensitive).
2989 // Matches a string that ends with 'suffix' (case-sensitive).
2998 // Creates a polymorphic matcher that matches a 2-tuple where the
3002 // Creates a polymorphic matcher that matches a 2-tuple where the
3006 // Creates a polymorphic matcher that matches a 2-tuple where the
3010 // Creates a polymorphic matcher that matches a 2-tuple where the
3014 // Creates a polymorphic matcher that matches a 2-tuple where the
3018 // Creates a polymorphic matcher that matches a 2-tuple where the
3022 // Creates a matcher that matches any value of type T that m doesn't
3029 // Returns a matcher that matches anything that satisfies the given
3038 // Returns a matcher that matches an equal container.
3053 // Returns a matcher that matches a container that, when sorted using
3054 // the given comparator, matches container_matcher.
3063 // Returns a matcher that matches a container that, when sorted using
3064 // the < operator, matches container_matcher.
3073 // Matches an STL-style container or a native array that contains the
3090 // Matches an STL-style container or a native array that contains at
3113 // Matches an STL-style container or a native array that contains only
3121 // // Each(m) matches an empty container, regardless of what m is.
3145 // Key(inner_matcher) matches an std::pair whose 'first' field matches
3153 // Pair(first_matcher, second_matcher) matches a std::pair whose 'first' field
3154 // matches first_matcher and whose 'second' field matches second_matcher. For
3165 // Returns a predicate that is satisfied by anything that matches the
3168 inline internal::MatcherAsPredicate<M> Matches(M matcher) {
3172 // Returns true iff the value matches the matcher.
3175 return testing::Matches(matcher)(value);
3178 // Matches the value against the given matcher and explains the match
3198 // succeed iff the value matches the matcher. If the assertion fails,