Lines Matching defs:value

74 // used by a matcher to explain why a value matches or doesn't match.
122 // a verb phrase that describes the property a value matching this
123 // matcher should have. The subject of the verb phrase is the value
166 // size is 0 when the value is already known to be empty.
314 // object that can check whether a value of type T matches. The
323 // cannot use it until a valid value has been assigned to it.
332 Matcher(T value); // NOLINT
425 // bool MatchAndExplain(const Value& value,
512 // Matcher but is not one yet; for example, Eq(value)) or a value (for
519 // its conversion operator to create Matcher<T>. Or it can be a value
530 // a value).
534 internal::ImplicitlyConvertible<M, Matcher<T> >::value>());
538 static Matcher<T> CastImpl(const M& value, BooleanConstant<false>) {
540 // matcher. It must be a value then. Use direct initialization to create
542 return Matcher<T>(ImplicitCast_<T>(value));
643 GTEST_COMPILE_ASSERT_((internal::ImplicitlyConvertible<T, U>::value),
648 internal::is_reference<T>::value || !internal::is_reference<U>::value,
658 (internal::LosslessArithmeticConvertible<RawT, RawU>::value),
669 // A<T>() returns a matcher that matches any value of type T.
686 // This is used to decide whether printing the type of a value might
695 // Matches the value against the given matcher, prints the value and explains
701 bool MatchPrintAndExplain(Value& value, const Matcher<T>& matcher,
706 return matcher.Matches(value);
710 const bool match = matcher.MatchAndExplain(value, &inner_listener);
712 UniversalPrint(value, listener->stream());
754 Value value = get<N - 1>(values);
756 if (!matcher.MatchAndExplain(value, &listener)) {
763 // universal printer from printing the address of value, which
767 internal::UniversalPrint(value, os);
800 GTEST_COMPILE_ASSERT_(tuple_size<MatcherTuple>::value ==
801 tuple_size<ValueTuple>::value,
803 return TuplePrefix<tuple_size<ValueTuple>::value>::
813 TuplePrefix<tuple_size<MatcherTuple>::value>::ExplainMatchFailuresTo(
828 // Returns the final value of 'out' in case the caller needs it.
830 return IterateOverTuple<Tuple, TupleSize::value>()(f, t, out);
837 *out++ = f(::testing::get<TupleSize::value - kRemainingSize>(t));
850 // appending each result to the 'out' iterator. Returns the final value
872 // Implements _, a matcher that matches any value of any
882 // Implements a matcher that compares a given value with a
883 // pre-supplied value using one of the ==, <=, <, etc, operators. The
1467 // Implements the Not(m) matcher, which matches a value that doesn't
1636 // matches a value that matches all of the matchers m_1, ..., and m_n.
1730 // matches a value that matches at least one of the matchers m_1, ...,
1769 // a value to bool (warning 4800).
1803 // The argument x is passed by reference instead of by value, as
1876 // Implementation detail: 'matcher' is received by-value to force decaying.
1921 virtual bool MatchAndExplain(T value,
1923 const FloatingPoint<FloatType> actual(value), expected(expected_);
1935 // of error bounds. If the result of value - expected_ would result in
1936 // overflow or if either value is inf, the default result is infinity,
1938 if (value == expected_) {
1942 const FloatType diff = value - expected_;
2004 // max_abs_error will be used for value comparison when >= 0.
2034 // max_abs_error will be used for value comparison when >= 0.
2072 *os << "points to a value that ";
2077 *os << "does not point to a value that ";
2198 bool MatchAndExplain(const T& value, MatchResultListener* listener) const {
2202 value, listener);
2234 // (i.e. return value of a getter method) of an object.
2259 bool MatchAndExplain(const T&value, MatchResultListener* listener) const {
2263 value, listener);
2273 // Cannot pass the return value (for example, int) to MatchPrintAndExplain,
2334 // Implements the ResultOf() matcher for matching a return value of a
2361 *os << "is mapped by the given callable to a value that ";
2366 *os << "is mapped by the given callable to a value that ";
2372 // Cannot pass the return value (for example, int) to
2722 // We pass the LHS value and the RHS value to the inner matcher by
2735 << " values, where each value and its corresponding value in ";
2742 << " values, or contains a value x at some index i"
2743 << " where x and the i-th value of ";
2767 *listener << "where the value pair (";
2958 *listener << "whose first field is a value " << explanation;
3066 *listener << ", where the first field is a value " << first_explanation;
3075 *listener << "the second field is a value " << second_explanation;
3463 matchers.reserve(::testing::tuple_size<MatcherTuple>::value);
3488 matchers.reserve(::testing::tuple_size<MatcherTuple>::value);
3542 // Given a 2-tuple matcher tm of type Tuple2Matcher and a value second
3544 // second) is a polymorphic matcher that matches a value x iff tm
3607 // Given a 2-tuple matcher tm and a value second,
3609 // value x iff tm matches tuple (x, second). Useful for implementing
3730 // Creates a matcher that matches any value of the given type T.
3734 // Creates a matcher that matches any value of the given type T.
3744 // Constructs a Matcher<T> from a 'value' of type T. The constructed
3745 // matcher matches any value that's equal to 'value'.
3747 Matcher<T>::Matcher(T value) { *this = Eq(value); }
3870 // to a value that matches inner_matcher.
4104 // Creates a matcher that matches any value of type T that m doesn't
4122 // Note that the parameter 'size' can be a value of type size_type as well as
4264 // least one element matching the given value or matcher.
4287 // elements matching the given value or matcher.
4330 // is >= 5 and whose value equals "foo".
4345 // Returns true iff the value matches the matcher.
4347 inline bool Value(const T& value, M matcher) {
4348 return testing::Matches(matcher)(value);
4351 // Matches the value against the given matcher and explains the match
4355 M matcher, const T& value, MatchResultListener* listener) {
4356 return SafeMatcherCast<const T&>(matcher).MatchAndExplain(value, listener);
4385 // tests. ASSERT_THAT(value, matcher) and EXPECT_THAT(value, matcher)
4386 // succeed iff the value matches the matcher. If the assertion fails,
4387 // the value and the description of the matcher will be printed.
4388 #define ASSERT_THAT(value, matcher) ASSERT_PRED_FORMAT1(\
4389 ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)
4390 #define EXPECT_THAT(value, matcher) EXPECT_PRED_FORMAT1(\
4391 ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)