Lines Matching defs:os
442 void DescribeTo(::std::ostream* os) const override {
443 source_matcher_.DescribeTo(os);
446 void DescribeNegationTo(::std::ostream* os) const override {
447 source_matcher_.DescribeNegationTo(os);
566 ::std::ostream* os) {
567 if (!explanation.empty() && os != nullptr) {
568 *os << ", " << explanation;
625 // TuplePrefix<N>::ExplainMatchFailuresTo(matchers, values, os)
628 // nothing will be streamed to os.
632 ::std::ostream* os) {
634 TuplePrefix<N - 1>::ExplainMatchFailuresTo(matchers, values, os);
644 *os << " Expected arg #" << N - 1 << ": ";
645 std::get<N - 1>(matchers).DescribeTo(os);
646 *os << "\n Actual: ";
652 internal::UniversalPrint(value, os);
653 PrintIfNotEmpty(listener.str(), os);
654 *os << "\n";
672 ::std::ostream* /* os */) {}
693 // is no failure, nothing will be streamed to os.
696 const ValueTuple& values, ::std::ostream* os) {
698 matchers, values, os);
753 void DescribeTo(std::ostream* os) const { *os << "is anything"; }
754 void DescribeNegationTo(::std::ostream* os) const {
758 *os << "never matches";
772 void DescribeTo(::std::ostream* os) const { *os << "is NULL"; }
773 void DescribeNegationTo(::std::ostream* os) const { *os << "isn't NULL"; }
786 void DescribeTo(::std::ostream* os) const { *os << "isn't NULL"; }
787 void DescribeNegationTo(::std::ostream* os) const { *os << "is NULL"; }
843 void DescribeTo(::std::ostream* os) const override {
844 *os << "references the variable ";
845 UniversalPrinter<Super&>::Print(object_, os);
848 void DescribeNegationTo(::std::ostream* os) const override {
849 *os << "does not reference the variable ";
850 UniversalPrinter<Super&>::Print(object_, os);
939 void DescribeTo(::std::ostream* os) const {
940 DescribeToHelper(expect_eq_, os);
943 void DescribeNegationTo(::std::ostream* os) const {
944 DescribeToHelper(!expect_eq_, os);
948 void DescribeToHelper(bool expect_eq, ::std::ostream* os) const {
949 *os << (expect_eq ? "is " : "isn't ");
950 *os << "equal to ";
952 *os << "(ignoring case) ";
954 UniversalPrint(string_, os);
1002 void DescribeTo(::std::ostream* os) const {
1003 *os << "has substring ";
1004 UniversalPrint(substring_, os);
1007 void DescribeNegationTo(::std::ostream* os) const {
1008 *os << "has no substring ";
1009 UniversalPrint(substring_, os);
1056 void DescribeTo(::std::ostream* os) const {
1057 *os << "starts with ";
1058 UniversalPrint(prefix_, os);
1061 void DescribeNegationTo(::std::ostream* os) const {
1062 *os << "doesn't start with ";
1063 UniversalPrint(prefix_, os);
1110 void DescribeTo(::std::ostream* os) const {
1111 *os << "ends with ";
1112 UniversalPrint(suffix_, os);
1115 void DescribeNegationTo(::std::ostream* os) const {
1116 *os << "doesn't end with ";
1117 UniversalPrint(suffix_, os);
1149 void DescribeTo(::std::ostream* os) const {
1150 *os << "matches after Base64Unescape ";
1151 internal_matcher_.DescribeTo(os);
1154 void DescribeNegationTo(::std::ostream* os) const {
1155 *os << "does not match after Base64Unescape ";
1156 internal_matcher_.DescribeTo(os);
1184 static ::std::ostream& GetDesc(::std::ostream& os) { // NOLINT
1185 return os << D::Desc();
1195 void DescribeTo(::std::ostream* os) const override {
1196 *os << "are " << GetDesc;
1198 void DescribeNegationTo(::std::ostream* os) const override {
1199 *os << "aren't " << GetDesc;
1243 void DescribeTo(::std::ostream* os) const override {
1244 matcher_.DescribeNegationTo(os);
1247 void DescribeNegationTo(::std::ostream* os) const override {
1248 matcher_.DescribeTo(os);
1283 void DescribeTo(::std::ostream* os) const override {
1284 *os << "(";
1286 if (i != 0) *os << ") and (";
1287 matchers_[i].DescribeTo(os);
1289 *os << ")";
1292 void DescribeNegationTo(::std::ostream* os) const override {
1293 *os << "(";
1295 if (i != 0) *os << ") or (";
1296 matchers_[i].DescribeNegationTo(os);
1298 *os << ")";
1388 void DescribeTo(::std::ostream* os) const override {
1389 *os << "(";
1391 if (i != 0) *os << ") or (";
1392 matchers_[i].DescribeTo(os);
1394 *os << ")";
1397 void DescribeNegationTo(::std::ostream* os) const override {
1398 *os << "(";
1400 if (i != 0) *os << ") and (";
1401 matchers_[i].DescribeNegationTo(os);
1403 *os << ")";
1520 void DescribeTo(::std::ostream* os) const {
1521 *os << "satisfies the given predicate";
1524 void DescribeNegationTo(::std::ostream* os) const {
1525 *os << "doesn't satisfy the given predicate";
1638 void DescribeTo(::std::ostream* os) const { *os << "is NaN"; }
1639 void DescribeNegationTo(::std::ostream* os) const { *os << "isn't NaN"; }
1714 void DescribeTo(::std::ostream* os) const override {
1715 // os->precision() returns the previously set precision, which we
1719 os->precision(::std::numeric_limits<FloatType>::digits10 + 2);
1722 *os << "is NaN";
1724 *os << "never matches";
1727 *os << "is approximately " << expected_;
1729 *os << " (absolute error <= " << max_abs_error_ << ")";
1732 os->precision(old_precision);
1735 void DescribeNegationTo(::std::ostream* os) const override {
1738 os->precision(::std::numeric_limits<FloatType>::digits10 + 2);
1741 *os << "isn't NaN";
1743 *os << "is anything";
1746 *os << "isn't approximately " << expected_;
1748 *os << " (absolute error > " << max_abs_error_ << ")";
1752 os->precision(old_precision);
1821 static ::std::ostream& GetDesc(::std::ostream& os) { // NOLINT
1822 return os << "an almost-equal pair";
1844 void DescribeTo(::std::ostream* os) const override {
1845 *os << "are " << GetDesc;
1847 void DescribeNegationTo(::std::ostream* os) const override {
1848 *os << "aren't " << GetDesc;
1896 void DescribeTo(::std::ostream* os) const override {
1897 *os << "points to a value that ";
1898 matcher_.DescribeTo(os);
1901 void DescribeNegationTo(::std::ostream* os) const override {
1902 *os << "does not point to a value that ";
1903 matcher_.DescribeTo(os);
1955 void DescribeTo(::std::ostream* os) const override {
1956 *os << "is a pointer that ";
1957 matcher_.DescribeTo(os);
1960 void DescribeNegationTo(::std::ostream* os) const override {
1961 *os << "is not a pointer that ";
1962 matcher_.DescribeTo(os);
1992 void DescribeTo(::std::ostream* os) const {
1993 GetCastTypeDescription(os);
1994 matcher_.DescribeTo(os);
1997 void DescribeNegationTo(::std::ostream* os) const {
1998 GetCastTypeDescription(os);
1999 matcher_.DescribeNegationTo(os);
2008 static void GetCastTypeDescription(::std::ostream* os) {
2009 *os << "when dynamic_cast to " << GetToName() << ", ";
2064 void DescribeTo(::std::ostream* os) const {
2065 *os << "is an object " << whose_field_;
2066 matcher_.DescribeTo(os);
2069 void DescribeNegationTo(::std::ostream* os) const {
2070 *os << "is an object " << whose_field_;
2071 matcher_.DescribeNegationTo(os);
2131 void DescribeTo(::std::ostream* os) const {
2132 *os << "is an object " << whose_property_;
2133 matcher_.DescribeTo(os);
2136 void DescribeNegationTo(::std::ostream* os) const {
2137 *os << "is an object " << whose_property_;
2138 matcher_.DescribeNegationTo(os);
2247 void DescribeTo(::std::ostream* os) const override {
2249 *os << "is mapped by the given callable to a value that ";
2251 *os << "whose " << result_description_ << " ";
2253 matcher_.DescribeTo(os);
2256 void DescribeNegationTo(::std::ostream* os) const override {
2258 *os << "is mapped by the given callable to a value that ";
2260 *os << "whose " << result_description_ << " ";
2262 matcher_.DescribeNegationTo(os);
2315 void DescribeTo(::std::ostream* os) const override {
2316 *os << "has a size that ";
2317 size_matcher_.DescribeTo(os);
2319 void DescribeNegationTo(::std::ostream* os) const override {
2320 *os << "has a size that ";
2321 size_matcher_.DescribeNegationTo(os);
2368 void DescribeTo(::std::ostream* os) const override {
2369 *os << "distance between begin() and end() ";
2370 distance_matcher_.DescribeTo(os);
2372 void DescribeNegationTo(::std::ostream* os) const override {
2373 *os << "distance between begin() and end() ";
2374 distance_matcher_.DescribeNegationTo(os);
2426 void DescribeTo(::std::ostream* os) const {
2427 *os << "equals ";
2428 UniversalPrint(expected_, os);
2430 void DescribeNegationTo(::std::ostream* os) const {
2431 *os << "does not equal ";
2432 UniversalPrint(expected_, os);
2444 ::std::ostream* const os = listener->stream();
2445 if (os != nullptr) {
2453 *os << ", ";
2455 *os << "which has these unexpected elements: ";
2458 UniversalPrint(*it, os);
2469 *os << ", ";
2471 *os << (printed_header ? ",\nand" : "which")
2475 UniversalPrint(*it, os);
2525 void DescribeTo(::std::ostream* os) const override {
2526 *os << "(when sorted) ";
2527 matcher_.DescribeTo(os);
2530 void DescribeNegationTo(::std::ostream* os) const override {
2531 *os << "(when sorted) ";
2532 matcher_.DescribeNegationTo(os);
2628 void DescribeTo(::std::ostream* os) const override {
2629 *os << "contains " << rhs_.size()
2631 UniversalPrinter<RhsStlContainer>::Print(rhs_, os);
2632 *os << " ";
2633 mono_tuple_matcher_.DescribeTo(os);
2635 void DescribeNegationTo(::std::ostream* os) const override {
2636 *os << "doesn't contain exactly " << rhs_.size()
2639 UniversalPrint(rhs_, os);
2640 *os << " ";
2641 mono_tuple_matcher_.DescribeNegationTo(os);
2793 void DescribeTo(::std::ostream* os) const override {
2794 *os << "contains at least one element that ";
2795 this->inner_matcher_.DescribeTo(os);
2798 void DescribeNegationTo(::std::ostream* os) const override {
2799 *os << "doesn't contain any element that ";
2800 this->inner_matcher_.DescribeTo(os);
2819 void DescribeTo(::std::ostream* os) const override {
2820 *os << "only contains elements that ";
2821 this->inner_matcher_.DescribeTo(os);
2824 void DescribeNegationTo(::std::ostream* os) const override {
2825 *os << "contains some element that ";
2826 this->inner_matcher_.DescribeNegationTo(os);
2846 void DescribeTo(::std::ostream* os) const override {
2847 *os << "quantity of elements that match ";
2848 this->inner_matcher_.DescribeTo(os);
2849 *os << " ";
2850 count_matcher_.DescribeTo(os);
2853 void DescribeNegationTo(::std::ostream* os) const override {
2854 *os << "quantity of elements that match ";
2855 this->inner_matcher_.DescribeTo(os);
2856 *os << " ";
2857 count_matcher_.DescribeNegationTo(os);
2978 void DescribeTo(::std::ostream* os) const override {
2979 *os << "has a key that ";
2980 inner_matcher_.DescribeTo(os);
2984 void DescribeNegationTo(::std::ostream* os) const override {
2985 *os << "doesn't have a key that ";
2986 inner_matcher_.DescribeTo(os);
3029 void DescribeTo(::std::ostream* os) const override {
3030 *os << "has address that ";
3031 matcher_.DescribeTo(os);
3034 void DescribeNegationTo(::std::ostream* os) const override {
3035 *os << "does not have address that ";
3036 matcher_.DescribeTo(os);
3069 void DescribeTo(::std::ostream* os) const override {
3070 *os << "has a first field that ";
3071 first_matcher_.DescribeTo(os);
3072 *os << ", and has a second field that ";
3073 second_matcher_.DescribeTo(os);
3077 void DescribeNegationTo(::std::ostream* os) const override {
3078 *os << "has a first field that ";
3079 first_matcher_.DescribeNegationTo(os);
3080 *os << ", or has a second field that ";
3081 second_matcher_.DescribeNegationTo(os);
3290 void DescribeTo(::std::ostream* os) const override {
3293 {(*os << separator << "has field #" << I << " that ",
3294 std::get<I>(matchers_).DescribeTo(os), separator = ", and ")...});
3297 void DescribeNegationTo(::std::ostream* os) const override {
3299 VariadicExpand({(*os << separator << "has field #" << I << " that ",
3300 std::get<I>(matchers_).DescribeNegationTo(os),
3386 void DescribeTo(::std::ostream* os) const override {
3388 *os << "is empty";
3390 *os << "has 1 element that ";
3391 matchers_[0].DescribeTo(os);
3393 *os << "has " << Elements(count()) << " where\n";
3395 *os << "element #" << i << " ";
3396 matchers_[i].DescribeTo(os);
3398 *os << ",\n";
3405 void DescribeNegationTo(::std::ostream* os) const override {
3407 *os << "isn't empty";
3411 *os << "doesn't have " << Elements(count()) << ", or\n";
3413 *os << "element #" << i << " ";
3414 matchers_[i].DescribeNegationTo(os);
3416 *os << ", or\n";
3584 void DescribeToImpl(::std::ostream* os) const;
3587 void DescribeNegationToImpl(::std::ostream* os) const;
3635 void DescribeTo(::std::ostream* os) const override {
3636 return UnorderedElementsAreMatcherImplBase::DescribeToImpl(os);
3640 void DescribeNegationTo(::std::ostream* os) const override {
3641 return UnorderedElementsAreMatcherImplBase::DescribeNegationToImpl(os);
3840 void DescribeTo(::std::ostream* os) const override {
3841 *os << "and ";
3842 UniversalPrint(second_value_, os);
3843 *os << " ";
3844 mono_tuple2_matcher_.DescribeTo(os);
3900 void DescribeTo(::std::ostream* os) const override {
3901 *os << "value ";
3902 value_matcher_.DescribeTo(os);
3905 void DescribeNegationTo(::std::ostream* os) const override {
3906 *os << "value ";
3907 value_matcher_.DescribeNegationTo(os);
3969 void DescribeTo(std::ostream* os) const {
3970 *os << "is a variant<> with value of type '" << GetTypeName()
3972 matcher_.DescribeTo(os);
3975 void DescribeNegationTo(std::ostream* os) const {
3976 *os << "is a variant<> with value of type other than '" << GetTypeName()
3978 matcher_.DescribeNegationTo(os);
4030 void DescribeTo(std::ostream* os) const {
4031 *os << "is an 'any' type with value of type '" << GetTypeName()
4033 matcher_.DescribeTo(os);
4036 void DescribeNegationTo(std::ostream* os) const {
4037 *os << "is an 'any' type with value of type other than '" << GetTypeName()
4039 matcher_.DescribeNegationTo(os);
4087 void DescribeTo(::std::ostream* os) const override {
4088 *os << "are a tuple ";
4089 PrintIndices(os);
4090 inner_matcher_.DescribeTo(os);
4093 void DescribeNegationTo(::std::ostream* os) const override {
4094 *os << "are a tuple ";
4095 PrintIndices(os);
4096 inner_matcher_.DescribeNegationTo(os);
4101 static void PrintIndices(::std::ostream* os) {
4102 *os << "whose fields (";
4111 "", (static_cast<void>(*os << sep << "#" << k), sep = ", ")...};
4113 *os << ") ";
5277 void DescribeTo(std::ostream* os) const {
5278 *os << "contains .what() that ";
5279 matcher_.DescribeTo(os);
5282 void DescribeNegationTo(std::ostream* os) const {
5283 *os << "contains .what() that does not ";
5284 matcher_.DescribeTo(os);
5343 void DescribeTo(std::ostream* os) const {
5344 *os << "throws an exception which is a " << GetTypeName<Err>();
5345 *os << " which ";
5346 matcher_.DescribeTo(os);
5349 void DescribeNegationTo(std::ostream* os) const {
5350 *os << "throws an exception which is not a " << GetTypeName<Err>();
5351 *os << " which ";
5352 matcher_.DescribeNegationTo(os);