2843 {
2844
2845
2847 LhsView;
2848 typedef typename LhsView::type LhsStlContainer;
2850 if (lhs_stl_container == expected_)
2851 return true;
2852
2853 ::std::ostream*
const os = listener->stream();
2855
2856 bool printed_header = false;
2857 for (typename LhsStlContainer::const_iterator it =
2858 lhs_stl_container.begin();
2859 it != lhs_stl_container.end(); ++it) {
2861 expected_.end()) {
2862 if (printed_header) {
2864 } else {
2865 *
os <<
"which has these unexpected elements: ";
2866 printed_header = true;
2867 }
2869 }
2870 }
2871
2872
2873 bool printed_header2 = false;
2874 for (typename StlContainer::const_iterator it = expected_.begin();
2875 it != expected_.end(); ++it) {
2877 lhs_stl_container.begin(), lhs_stl_container.end(), *it) ==
2878 lhs_stl_container.end()) {
2879 if (printed_header2) {
2881 } else {
2882 *
os << (printed_header ?
",\nand" :
"which")
2883 << " doesn't have these expected elements: ";
2884 printed_header2 = true;
2885 }
2887 }
2888 }
2889 }
2890
2891 return false;
2892 }
View::const_reference StlContainerReference
#define GTEST_REMOVE_CONST_(T)
Iter ArrayAwareFind(Iter begin, Iter end, const Element &elem)