Lines Matching defs:os

85   explicit MatchResultListener(::std::ostream* os) : stream_(os) {}
126 virtual void DescribeTo(::std::ostream* os) const = 0;
134 virtual void DescribeNegationTo(::std::ostream* os) const {
135 *os << "not (";
136 DescribeTo(os);
137 *os << ")";
179 // virtual void DescribeTo(::std::ostream* os) const = 0;
180 // virtual void DescribeNegationTo(::std::ostream* os) const;
241 explicit StreamMatchResultListener(::std::ostream* os)
242 : MatchResultListener(os) {}
267 void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); }
270 void DescribeNegationTo(::std::ostream* os) const {
271 impl_->DescribeNegationTo(os);
275 void ExplainMatchResultTo(T x, ::std::ostream* os) const {
276 StreamMatchResultListener listener(os);
453 virtual void DescribeTo(::std::ostream* os) const {
454 impl_.DescribeTo(os);
457 virtual void DescribeNegationTo(::std::ostream* os) const {
458 impl_.DescribeNegationTo(os);
580 virtual void DescribeTo(::std::ostream* os) const {
581 source_matcher_.DescribeTo(os);
584 virtual void DescribeNegationTo(::std::ostream* os) const {
585 source_matcher_.DescribeNegationTo(os);
679 ::std::ostream* os) {
680 if (explanation != "" && os != NULL) {
681 *os << ", " << explanation;
738 // TuplePrefix<N>::ExplainMatchFailuresTo(matchers, values, os)
741 // nothing will be streamed to os.
745 ::std::ostream* os) {
747 TuplePrefix<N - 1>::ExplainMatchFailuresTo(matchers, values, os);
759 *os << " Expected arg #" << N - 1 << ": ";
760 get<N - 1>(matchers).DescribeTo(os);
761 *os << "\n Actual: ";
767 internal::UniversalPrint(value, os);
768 PrintIfNotEmpty(listener.str(), os);
769 *os << "\n";
787 ::std::ostream* /* os */) {}
808 // is no failure, nothing will be streamed to os.
812 ::std::ostream* os) {
814 matchers, values, os);
863 virtual void DescribeTo(::std::ostream* os) const { *os << "is anything"; }
864 virtual void DescribeNegationTo(::std::ostream* os) const {
868 *os << "never matches";
910 virtual void DescribeTo(::std::ostream* os) const {
911 *os << D::Desc() << " ";
912 UniversalPrint(rhs_, os);
914 virtual void DescribeNegationTo(::std::ostream* os) const {
915 *os << D::NegatedDesc() << " ";
916 UniversalPrint(rhs_, os);
989 void DescribeTo(::std::ostream* os) const { *os << "is NULL"; }
990 void DescribeNegationTo(::std::ostream* os) const {
991 *os << "isn't NULL";
1009 void DescribeTo(::std::ostream* os) const { *os << "isn't NULL"; }
1010 void DescribeNegationTo(::std::ostream* os) const {
1011 *os << "is NULL";
1068 virtual void DescribeTo(::std::ostream* os) const {
1069 *os << "references the variable ";
1070 UniversalPrinter<Super&>::Print(object_, os);
1073 virtual void DescribeNegationTo(::std::ostream* os) const {
1074 *os << "does not reference the variable ";
1075 UniversalPrinter<Super&>::Print(object_, os);
1158 void DescribeTo(::std::ostream* os) const {
1159 DescribeToHelper(expect_eq_, os);
1162 void DescribeNegationTo(::std::ostream* os) const {
1163 DescribeToHelper(!expect_eq_, os);
1167 void DescribeToHelper(bool expect_eq, ::std::ostream* os) const {
1168 *os << (expect_eq ? "is " : "isn't ");
1169 *os << "equal to ";
1171 *os << "(ignoring case) ";
1173 UniversalPrint(string_, os);
1214 void DescribeTo(::std::ostream* os) const {
1215 *os << "has substring ";
1216 UniversalPrint(substring_, os);
1219 void DescribeNegationTo(::std::ostream* os) const {
1220 *os << "has no substring ";
1221 UniversalPrint(substring_, os);
1261 void DescribeTo(::std::ostream* os) const {
1262 *os << "starts with ";
1263 UniversalPrint(prefix_, os);
1266 void DescribeNegationTo(::std::ostream* os) const {
1267 *os << "doesn't start with ";
1268 UniversalPrint(prefix_, os);
1307 void DescribeTo(::std::ostream* os) const {
1308 *os << "ends with ";
1309 UniversalPrint(suffix_, os);
1312 void DescribeNegationTo(::std::ostream* os) const {
1313 *os << "doesn't end with ";
1314 UniversalPrint(suffix_, os);
1353 void DescribeTo(::std::ostream* os) const {
1354 *os << (full_match_ ? "matches" : "contains")
1356 UniversalPrinter<internal::string>::Print(regex_->pattern(), os);
1359 void DescribeNegationTo(::std::ostream* os) const {
1360 *os << "doesn't " << (full_match_ ? "match" : "contain")
1362 UniversalPrinter<internal::string>::Print(regex_->pattern(), os);
1393 static ::std::ostream& GetDesc(::std::ostream& os) { // NOLINT
1394 return os << D::Desc();
1405 virtual void DescribeTo(::std::ostream* os) const {
1406 *os << "are " << GetDesc;
1408 virtual void DescribeNegationTo(::std::ostream* os) const {
1409 *os << "aren't " << GetDesc;
1453 virtual void DescribeTo(::std::ostream* os) const {
1454 matcher_.DescribeNegationTo(os);
1457 virtual void DescribeNegationTo(::std::ostream* os) const {
1458 matcher_.DescribeTo(os);
1497 virtual void DescribeTo(::std::ostream* os) const {
1498 *os << "(";
1499 matcher1_.DescribeTo(os);
1500 *os << ") and (";
1501 matcher2_.DescribeTo(os);
1502 *os << ")";
1505 virtual void DescribeNegationTo(::std::ostream* os) const {
1506 *os << "(";
1507 matcher1_.DescribeNegationTo(os);
1508 *os << ") or (";
1509 matcher2_.DescribeNegationTo(os);
1510 *os << ")";
1669 virtual void DescribeTo(::std::ostream* os) const {
1670 *os << "(";
1671 matcher1_.DescribeTo(os);
1672 *os << ") or (";
1673 matcher2_.DescribeTo(os);
1674 *os << ")";
1677 virtual void DescribeNegationTo(::std::ostream* os) const {
1678 *os << "(";
1679 matcher1_.DescribeNegationTo(os);
1680 *os << ") and (";
1681 matcher2_.DescribeNegationTo(os);
1682 *os << ")";
1779 void DescribeTo(::std::ostream* os) const {
1780 *os << "satisfies the given predicate";
1783 void DescribeNegationTo(::std::ostream* os) const {
1784 *os << "doesn't satisfy the given predicate";
1956 virtual void DescribeTo(::std::ostream* os) const {
1957 // os->precision() returns the previously set precision, which we
1960 const ::std::streamsize old_precision = os->precision(
1964 *os << "is NaN";
1966 *os << "never matches";
1969 *os << "is approximately " << expected_;
1971 *os << " (absolute error <= " << max_abs_error_ << ")";
1974 os->precision(old_precision);
1977 virtual void DescribeNegationTo(::std::ostream* os) const {
1979 const ::std::streamsize old_precision = os->precision(
1983 *os << "isn't NaN";
1985 *os << "is anything";
1988 *os << "isn't approximately " << expected_;
1990 *os << " (absolute error > " << max_abs_error_ << ")";
1994 os->precision(old_precision);
2071 virtual void DescribeTo(::std::ostream* os) const {
2072 *os << "points to a value that ";
2073 matcher_.DescribeTo(os);
2076 virtual void DescribeNegationTo(::std::ostream* os) const {
2077 *os << "does not point to a value that ";
2078 matcher_.DescribeTo(os);
2113 void DescribeTo(::std::ostream* os) const {
2114 GetCastTypeDescription(os);
2115 matcher_.DescribeTo(os);
2118 void DescribeNegationTo(::std::ostream* os) const {
2119 GetCastTypeDescription(os);
2120 matcher_.DescribeNegationTo(os);
2135 static void GetCastTypeDescription(::std::ostream* os) {
2136 *os << "when dynamic_cast to " << GetToName() << ", ";
2187 void DescribeTo(::std::ostream* os) const {
2188 *os << "is an object whose given field ";
2189 matcher_.DescribeTo(os);
2192 void DescribeNegationTo(::std::ostream* os) const {
2193 *os << "is an object whose given field ";
2194 matcher_.DescribeNegationTo(os);
2248 void DescribeTo(::std::ostream* os) const {
2249 *os << "is an object whose given property ";
2250 matcher_.DescribeTo(os);
2253 void DescribeNegationTo(::std::ostream* os) const {
2254 *os << "is an object whose given property ";
2255 matcher_.DescribeNegationTo(os);
2360 virtual void DescribeTo(::std::ostream* os) const {
2361 *os << "is mapped by the given callable to a value that ";
2362 matcher_.DescribeTo(os);
2365 virtual void DescribeNegationTo(::std::ostream* os) const {
2366 *os << "is mapped by the given callable to a value that ";
2367 matcher_.DescribeNegationTo(os);
2419 virtual void DescribeTo(::std::ostream* os) const {
2420 *os << "size ";
2421 size_matcher_.DescribeTo(os);
2423 virtual void DescribeNegationTo(::std::ostream* os) const {
2424 *os << "size ";
2425 size_matcher_.DescribeNegationTo(os);
2473 virtual void DescribeTo(::std::ostream* os) const {
2474 *os << "distance between begin() and end() ";
2475 distance_matcher_.DescribeTo(os);
2477 virtual void DescribeNegationTo(::std::ostream* os) const {
2478 *os << "distance between begin() and end() ";
2479 distance_matcher_.DescribeNegationTo(os);
2537 void DescribeTo(::std::ostream* os) const {
2538 *os << "equals ";
2539 UniversalPrint(expected_, os);
2541 void DescribeNegationTo(::std::ostream* os) const {
2542 *os << "does not equal ";
2543 UniversalPrint(expected_, os);
2558 ::std::ostream* const os = listener->stream();
2559 if (os != NULL) {
2568 *os << ", ";
2570 *os << "which has these unexpected elements: ";
2573 UniversalPrint(*it, os);
2585 *os << ", ";
2587 *os << (printed_header ? ",\nand" : "which")
2591 UniversalPrint(*it, os);
2639 virtual void DescribeTo(::std::ostream* os) const {
2640 *os << "(when sorted) ";
2641 matcher_.DescribeTo(os);
2644 virtual void DescribeNegationTo(::std::ostream* os) const {
2645 *os << "(when sorted) ";
2646 matcher_.DescribeNegationTo(os);
2733 virtual void DescribeTo(::std::ostream* os) const {
2734 *os << "contains " << rhs_.size()
2736 UniversalPrinter<RhsStlContainer>::Print(rhs_, os);
2737 *os << " ";
2738 mono_tuple_matcher_.DescribeTo(os);
2740 virtual void DescribeNegationTo(::std::ostream* os) const {
2741 *os << "doesn't contain exactly " << rhs_.size()
2744 UniversalPrint(rhs_, os);
2745 *os << " ";
2746 mono_tuple_matcher_.DescribeNegationTo(os);
2852 virtual void DescribeTo(::std::ostream* os) const {
2853 *os << "contains at least one element that ";
2854 this->inner_matcher_.DescribeTo(os);
2857 virtual void DescribeNegationTo(::std::ostream* os) const {
2858 *os << "doesn't contain any element that ";
2859 this->inner_matcher_.DescribeTo(os);
2881 virtual void DescribeTo(::std::ostream* os) const {
2882 *os << "only contains elements that ";
2883 this->inner_matcher_.DescribeTo(os);
2886 virtual void DescribeNegationTo(::std::ostream* os) const {
2887 *os << "contains some element that ";
2888 this->inner_matcher_.DescribeNegationTo(os);
2964 virtual void DescribeTo(::std::ostream* os) const {
2965 *os << "has a key that ";
2966 inner_matcher_.DescribeTo(os);
2970 virtual void DescribeNegationTo(::std::ostream* os) const {
2971 *os << "doesn't have a key that ";
2972 inner_matcher_.DescribeTo(os);
3016 virtual void DescribeTo(::std::ostream* os) const {
3017 *os << "has a first field that ";
3018 first_matcher_.DescribeTo(os);
3019 *os << ", and has a second field that ";
3020 second_matcher_.DescribeTo(os);
3024 virtual void DescribeNegationTo(::std::ostream* os) const {
3025 *os << "has a first field that ";
3026 first_matcher_.DescribeNegationTo(os);
3027 *os << ", or has a second field that ";
3028 second_matcher_.DescribeNegationTo(os);
3126 virtual void DescribeTo(::std::ostream* os) const {
3128 *os << "is empty";
3130 *os << "has 1 element that ";
3131 matchers_[0].DescribeTo(os);
3133 *os << "has " << Elements(count()) << " where\n";
3135 *os << "element #" << i << " ";
3136 matchers_[i].DescribeTo(os);
3138 *os << ",\n";
3145 virtual void DescribeNegationTo(::std::ostream* os) const {
3147 *os << "isn't empty";
3151 *os << "doesn't have " << Elements(count()) << ", or\n";
3153 *os << "element #" << i << " ";
3154 matchers_[i].DescribeNegationTo(os);
3156 *os << ", or\n";
3319 void DescribeToImpl(::std::ostream* os) const;
3322 void DescribeNegationToImpl(::std::ostream* os) const;
3367 virtual void DescribeTo(::std::ostream* os) const {
3368 return UnorderedElementsAreMatcherImplBase::DescribeToImpl(os);
3372 virtual void DescribeNegationTo(::std::ostream* os) const {
3373 return UnorderedElementsAreMatcherImplBase::DescribeNegationToImpl(os);
3584 virtual void DescribeTo(::std::ostream* os) const {
3585 *os << "and ";
3586 UniversalPrint(second_value_, os);
3587 *os << " ";
3588 mono_tuple2_matcher_.DescribeTo(os);