Lines Matching refs:matchers

33 // define custom matchers easily.
122 // support multi-parameter matchers.
187 // can be useful when composing matchers.
218 // You can overload matchers with different numbers of parameters:
232 // overloading matchers based on parameter types (as opposed to just
245 // This file also implements some commonly used argument matchers. More
246 // matchers can be defined by the user implementing the
249 // See googletest/include/gtest/gtest-matchers.h for the definition of class
299 // is impossible if we pass matchers by pointers. It also eases
516 // This overload handles polymorphic matchers and values only since
517 // monomorphic matchers are handled by the next one.
523 // This overload handles monomorphic matchers.
583 // Value cannot be passed by const reference, because some matchers take a
623 // TuplePrefix<N>::ExplainMatchFailuresTo(matchers, values, os)
624 // describes failures in matching the first N fields of matchers
628 static void ExplainMatchFailuresTo(const MatcherTuple& matchers,
632 TuplePrefix<N - 1>::ExplainMatchFailuresTo(matchers, values, os);
637 std::get<N - 1>(matchers);
643 std::get<N - 1>(matchers).DescribeTo(os);
668 static void ExplainMatchFailuresTo(const MatcherTuple& /* matchers */,
674 // all matchers in matcher_tuple match the corresponding fields in
690 // Describes failures in matching matchers against values. If there
693 void ExplainMatchFailureTupleTo(const MatcherTuple& matchers,
696 matchers, values, os);
858 // Polymorphic helper functions for narrow and wide string matchers.
890 // String matchers.
892 // Implements equality-based string matchers like StrEq, StrCaseNe, and etc.
1278 explicit AllOfMatcherImpl(std::vector<Matcher<T>> matchers)
1279 : matchers_(std::move(matchers)) {}
1334 // CombiningMatcher<T> is used to recursively combine the provided matchers
1339 VariadicMatcher(const Args&... matchers) // NOLINT
1340 : matchers_(matchers...) {
1349 // all of the provided matchers (Matcher1, Matcher2, ...) can match.
1383 explicit AnyOfMatcherImpl(std::vector<Matcher<T>> matchers)
1384 : matchers_(std::move(matchers)) {}
1468 // element matchers.
1475 std::vector<Matcher<RawU>> matchers;
1477 matchers.push_back(MatcherCast<RawU>(matcher));
1479 return Matcher<U>(new MatcherImpl<RawU>(std::move(matchers)));
3049 // type with its two matchers. See Pair() function below.
3281 explicit FieldsAreMatcherImpl(const Inner& matchers)
3284 std::get<I>(matchers))...) {}
3373 // element matchers.
3431 // Go through the elements and matchers in pairs, until we reach
3432 // the end of either the elements or the matchers, or until we find a
3507 // Connectivity matrix of (elements X matchers), in element-major order.
3576 // element matchers are alive).
3707 MatcherVec matchers;
3708 matchers.reserve(::std::tuple_size<MatcherTuple>::value);
3710 ::std::back_inserter(matchers));
3713 UnorderedMatcherRequire::ExactMatch, matchers.begin(),
3714 matchers.end()));
3738 MatcherVec matchers;
3739 matchers.reserve(::std::tuple_size<MatcherTuple>::value);
3741 ::std::back_inserter(matchers));
3743 matchers.begin(), matchers.end()));
4143 // can be either a sequence of values or a sequence of matchers.
4186 // collection of matchers exists.
4188 // The matchers can be specified as an array, a pointer and count, a container,
4190 // underlying matchers can be either values or matchers.
4368 // matchers of compatible types. For example, it allows
4397 // matchers of compatible types. For example, it allows
4466 // String matchers.
4526 // Wide string matchers.
4774 ::std::vector<internal::BoundSecondMatcher<Tuple2Matcher, Second>> matchers;
4777 matchers.push_back(internal::MatcherBindSecond(tuple2_matcher, *it));
4781 return UnorderedElementsAreArray(matchers);
4836 // of matchers exists. In other words, a container matches
4845 // both Eq(1) and Lt(2). The reason is that different matchers must be used
4852 // The matchers can be specified as an array, a pointer and count, a container,
4854 // underlying matchers can be either values or matchers.
4896 // IsSubsetOf() verifies that an injective mapping onto a collection of matchers
4898 // only if there is a subset of matchers {m1, ..., mk} which would match the
4906 // match Gt(0). The reason is that different matchers must be used for
4909 // The matchers can be specified as an array, a pointer and count, a container,
4911 // underlying matchers can be either values or matchers.
5012 // FieldsAre(matchers...) matches piecewise the fields of compatible structs.
5018 M&&... matchers) {
5020 std::forward<M>(matchers)...);
5070 // strings of matchers defined using MATCHER_P* macros that accept matchers as
5095 ElementsAre(const Args&... matchers) {
5098 std::make_tuple(matchers...));
5104 UnorderedElementsAre(const Args&... matchers) {
5107 std::make_tuple(matchers...));
5113 const Args&... matchers) {
5115 matchers...);
5120 const Args&... matchers) {
5122 matchers...);
5132 // collection of matchers.
5141 // collection of matchers.
5143 // The matchers can be specified as an array, a pointer and count, a container,
5145 // underlying matchers can be either values or matchers.
5432 // These macros allow using matchers to check values in Google Test
5615 // Include any custom callback matchers added by the local installation.
5618 #include "gmock/internal/custom/gmock-matchers.h"