38#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_
39#define GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_
51#include "gmock/internal/gmock-internal-utils.h"
52#include "gmock/internal/gmock-port.h"
53#include "gtest/gtest.h"
56#include <initializer_list>
98 ::std::ostream*
stream() {
return stream_; }
107 ::std::ostream*
const stream_;
143class MatcherInterface :
public MatcherDescriberInterface {
195 ::std::stringstream ss_;
203class DummyMatchResultListener :
public MatchResultListener {
232 return impl_->MatchAndExplain(x, listener);
242 void DescribeTo(::std::ostream* os)
const { impl_->DescribeTo(os); }
246 impl_->DescribeNegationTo(os);
294class Matcher :
public internal::MatcherBase<T> {
347#if GTEST_HAS_STRING_PIECE_
357 explicit Matcher(
const MatcherInterface<const StringPiece&>* impl)
358 : internal::MatcherBase<const StringPiece&>(impl) {}
377 explicit Matcher(
const MatcherInterface<StringPiece>* impl)
378 : internal::MatcherBase<StringPiece>(impl) {}
382 Matcher(
const internal::string& s);
385 Matcher(
const char* s);
388 Matcher(StringPiece s);
415 const Impl&
impl()
const {
return impl_; }
417 template <
typename T>
419 return Matcher<T>(
new MonomorphicImpl<T>(impl_));
423 template <
typename T>
426 explicit MonomorphicImpl(
const Impl&
impl) : impl_(
impl) {}
428 virtual void DescribeTo(::std::ostream* os)
const {
429 impl_.DescribeTo(os);
432 virtual void DescribeNegationTo(::std::ostream* os)
const {
433 impl_.DescribeNegationTo(os);
436 virtual bool MatchAndExplain(T x, MatchResultListener* listener)
const {
437 return impl_.MatchAndExplain(x, listener);
489template <
typename T,
typename M>
507 polymorphic_matcher_or_value,
520 static Matcher<T> CastImpl(M polymorphic_matcher_or_value,
521 BooleanConstant<true>) {
530 return polymorphic_matcher_or_value;
537template <
typename T,
typename U>
547 explicit Impl(
const Matcher<U>& source_matcher)
548 : source_matcher_(source_matcher) {}
552 return source_matcher_.MatchAndExplain(
static_cast<U
>(x), listener);
555 virtual void DescribeTo(::std::ostream* os)
const {
556 source_matcher_.DescribeTo(os);
559 virtual void DescribeNegationTo(::std::ostream* os)
const {
560 source_matcher_.DescribeNegationTo(os);
564 const Matcher<U> source_matcher_;
584template <
typename T,
typename M>
601 template <
typename M>
615 template <
typename U>
619 T_must_be_implicitly_convertible_to_U);
624 cannot_convert_non_referentce_arg_to_reference);
632 kTIsOther || kUIsOther ||
633 (internal::LosslessArithmeticConvertible<RawT, RawU>::value),
634 conversion_of_arithmetic_types_must_be_lossless);
639template <
typename T,
typename M>
654 ::std::ostream* os) {
655 if (explanation !=
"" && os != NULL) {
656 *os <<
", " << explanation;
666 return (type_name.length() <= 20 ||
667 type_name.find_first_of(
"<(") == string::npos);
675template <
typename Value,
typename T>
677 MatchResultListener* listener) {
678 if (!listener->IsInterested()) {
681 return matcher.Matches(
value);
684 StringMatchResultListener inner_listener;
685 const bool match = matcher.MatchAndExplain(
value, &inner_listener);
691 *listener->stream() <<
" (of type " << type_name <<
")";
706 template <
typename MatcherTuple,
typename ValueTuple>
708 const ValueTuple& value_tuple) {
709 using ::std::tr1::get;
711 && get<N - 1>(matcher_tuple).
Matches(get<N - 1>(value_tuple));
718 template <
typename MatcherTuple,
typename ValueTuple>
720 const ValueTuple& values,
721 ::std::ostream* os) {
723 using ::std::tr1::get;
731 get<N - 1>(matchers);
732 typedef typename tuple_element<N - 1, ValueTuple>
::type Value;
735 if (!matcher.MatchAndExplain(
value, &listener)) {
738 *os <<
" Expected arg #" << N - 1 <<
": ";
739 get<N - 1>(matchers).DescribeTo(os);
740 *os <<
"\n Actual: ";
755class TuplePrefix<0> {
757 template <
typename MatcherTuple,
typename ValueTuple>
759 const ValueTuple& ) {
763 template <
typename MatcherTuple,
typename ValueTuple>
774template <
typename MatcherTuple,
typename ValueTuple>
776 const ValueTuple& value_tuple) {
781 tuple_size<ValueTuple>::value,
782 matcher_and_value_have_different_numbers_of_fields);
783 return TuplePrefix<tuple_size<ValueTuple>::value>
::
784 Matches(matcher_tuple, value_tuple);
789template <
typename MatcherTuple,
typename ValueTuple>
791 const ValueTuple& values,
792 ::std::ostream* os) {
794 TuplePrefix<tuple_size<MatcherTuple>::value>::ExplainMatchFailuresTo(
795 matchers, values, os);
802template <
typename Tuple,
typename Func,
typename OutIter>
805 typedef typename ::std::tr1::tuple_size<Tuple> TupleSize;
810 static OutIter
Run(Func f,
const Tuple& t, OutIter out) {
811 return IterateOverTuple<Tuple, TupleSize::value>()(f, t, out);
815 template <
typename Tup,
size_t kRemainingSize>
816 struct IterateOverTuple {
817 OutIter operator() (Func f,
const Tup& t, OutIter out)
const {
818 *out++ = f(::std::tr1::get<TupleSize::value - kRemainingSize>(t));
819 return IterateOverTuple<Tup, kRemainingSize - 1>()(f, t, out);
822 template <
typename Tup>
823 struct IterateOverTuple<Tup, 0> {
824 OutIter operator() (Func ,
const Tup& , OutIter out)
const {
833template <
typename Tuple,
typename Func,
typename OutIter>
844 virtual void DescribeTo(::std::ostream* os)
const { *os <<
"is anything"; }
849 *os <<
"never matches";
857class AnythingMatcher {
859 template <
typename T>
876#define GMOCK_IMPLEMENT_COMPARISON_MATCHER_( \
877 name, op, relation, negated_relation) \
878 template <typename Rhs> class name##Matcher { \
880 explicit name##Matcher(const Rhs& rhs) : rhs_(rhs) {} \
881 template <typename Lhs> \
882 operator Matcher<Lhs>() const { \
883 return MakeMatcher(new Impl<Lhs>(rhs_)); \
886 template <typename Lhs> \
887 class Impl : public MatcherInterface<Lhs> { \
889 explicit Impl(const Rhs& rhs) : rhs_(rhs) {} \
890 virtual bool MatchAndExplain(\
891 Lhs lhs, MatchResultListener* ) const { \
892 return lhs op rhs_; \
894 virtual void DescribeTo(::std::ostream* os) const { \
895 *os << relation " "; \
896 UniversalPrint(rhs_, os); \
898 virtual void DescribeNegationTo(::std::ostream* os) const { \
899 *os << negated_relation " "; \
900 UniversalPrint(rhs_, os); \
904 GTEST_DISALLOW_ASSIGN_(Impl); \
907 GTEST_DISALLOW_ASSIGN_(name##Matcher); \
919#undef GMOCK_IMPLEMENT_COMPARISON_MATCHER_
925 template <
typename Po
inter>
931 void DescribeTo(::std::ostream* os)
const { *os <<
"is NULL"; }
939class NotNullMatcher {
941 template <
typename Po
inter>
947 void DescribeTo(::std::ostream* os)
const { *os <<
"isn't NULL"; }
970class RefMatcher<T&> {
982 template <
typename Super>
993 template <
typename Super>
996 explicit Impl(Super& x) : object_(x) {}
1000 virtual bool MatchAndExplain(
1002 *listener <<
"which is located @" <<
static_cast<const void*
>(&x);
1003 return &x == &object_;
1006 virtual void DescribeTo(::std::ostream* os)
const {
1007 *os <<
"references the variable ";
1008 UniversalPrinter<Super&>::Print(object_, os);
1011 virtual void DescribeNegationTo(::std::ostream* os)
const {
1012 *os <<
"does not reference the variable ";
1013 UniversalPrinter<Super&>::Print(object_, os);
1017 const Super& object_;
1033 const wchar_t* rhs) {
1039template <
typename StringType>
1041 const StringType& s2) {
1048 const typename StringType::value_type nul = 0;
1049 const size_t i1 = s1.find(nul), i2 = s2.find(nul);
1052 if (i1 == StringType::npos || i2 == StringType::npos) {
1063template <
typename StringType>
1067 bool case_sensitive)
1068 : string_(str), expect_eq_(expect_eq), case_sensitive_(case_sensitive) {}
1075 template <
typename CharType>
1087 template <
typename MatcheeStringType>
1090 const StringType& s2(s);
1091 const bool eq = case_sensitive_ ? s2 == string_ :
1093 return expect_eq_ == eq;
1097 DescribeToHelper(expect_eq_, os);
1101 DescribeToHelper(!expect_eq_, os);
1105 void DescribeToHelper(
bool expect_eq, ::std::ostream* os)
const {
1106 *os << (expect_eq ?
"is " :
"isn't ");
1108 if (!case_sensitive_) {
1109 *os <<
"(ignoring case) ";
1114 const StringType string_;
1115 const bool expect_eq_;
1116 const bool case_sensitive_;
1124template <
typename StringType>
1128 : substring_(substring) {}
1135 template <
typename CharType>
1144 template <
typename MatcheeStringType>
1147 const StringType& s2(s);
1148 return s2.find(substring_) != StringType::npos;
1153 *os <<
"has substring ";
1158 *os <<
"has no substring ";
1163 const StringType substring_;
1171template <
typename StringType>
1172class StartsWithMatcher {
1182 template <
typename CharType>
1191 template <
typename MatcheeStringType>
1194 const StringType& s2(s);
1195 return s2.length() >= prefix_.length() &&
1196 s2.substr(0, prefix_.length()) == prefix_;
1200 *os <<
"starts with ";
1205 *os <<
"doesn't start with ";
1210 const StringType prefix_;
1218template <
typename StringType>
1219class EndsWithMatcher {
1228 template <
typename CharType>
1237 template <
typename MatcheeStringType>
1240 const StringType& s2(s);
1241 return s2.length() >= suffix_.length() &&
1242 s2.substr(s2.length() - suffix_.length()) == suffix_;
1246 *os <<
"ends with ";
1251 *os <<
"doesn't end with ";
1256 const StringType suffix_;
1264class MatchesRegexMatcher {
1267 : regex_(regex), full_match_(full_match) {}
1274 template <
typename CharType>
1283 template <
class MatcheeStringType>
1292 *os << (full_match_ ?
"matches" :
"contains")
1293 <<
" regular expression ";
1298 *os <<
"doesn't " << (full_match_ ?
"match" :
"contain")
1299 <<
" regular expression ";
1305 const bool full_match_;
1321#define GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(name, op, relation) \
1322 class name##2Matcher { \
1324 template <typename T1, typename T2> \
1325 operator Matcher< ::std::tr1::tuple<T1, T2> >() const { \
1326 return MakeMatcher(new Impl< ::std::tr1::tuple<T1, T2> >); \
1328 template <typename T1, typename T2> \
1329 operator Matcher<const ::std::tr1::tuple<T1, T2>&>() const { \
1330 return MakeMatcher(new Impl<const ::std::tr1::tuple<T1, T2>&>); \
1333 template <typename Tuple> \
1334 class Impl : public MatcherInterface<Tuple> { \
1336 virtual bool MatchAndExplain( \
1338 MatchResultListener* ) const { \
1339 return ::std::tr1::get<0>(args) op ::std::tr1::get<1>(args); \
1341 virtual void DescribeTo(::std::ostream* os) const { \
1342 *os << "are " relation; \
1344 virtual void DescribeNegationTo(::std::ostream* os) const { \
1345 *os << "aren't " relation; \
1353 Ge, >=,
"a pair where the first >= the second");
1355 Gt, >,
"a pair where the first > the second");
1357 Le, <=,
"a pair where the first <= the second");
1359 Lt, <,
"a pair where the first < the second");
1362#undef GMOCK_IMPLEMENT_COMPARISON2_MATCHER_
1368template <
typename T>
1369class NotMatcherImpl :
public MatcherInterface<T> {
1372 : matcher_(matcher) {}
1375 return !matcher_.MatchAndExplain(x, listener);
1379 matcher_.DescribeNegationTo(os);
1383 matcher_.DescribeTo(os);
1394template <
typename InnerMatcher>
1401 template <
typename T>
1407 InnerMatcher matcher_;
1416template <
typename T>
1420 : matcher1_(matcher1), matcher2_(matcher2) {}
1424 matcher1_.DescribeTo(os);
1426 matcher2_.DescribeTo(os);
1432 matcher1_.DescribeNegationTo(os);
1434 matcher2_.DescribeNegationTo(os);
1442 if (!matcher1_.MatchAndExplain(x, &listener1)) {
1443 *listener << listener1.
str();
1448 if (!matcher2_.MatchAndExplain(x, &listener2)) {
1449 *listener << listener2.
str();
1462 *listener <<
", and " << s2;
1483template <
int kSize,
typename Head,
typename... Tail>
1485 typedef MatcherList<kSize - 1, Tail...> MatcherListTail;
1486 typedef ::std::pair<Head, typename MatcherListTail::ListType> ListType;
1492 static ListType BuildList(
const Head& matcher,
const Tail&... tail) {
1493 return ListType(matcher, MatcherListTail::BuildList(tail...));
1500 template <
typename T,
template <
typename >
class CombiningMatcher>
1501 static Matcher<T> CreateMatcher(const ListType& matchers) {
1502 return Matcher<T>(
new CombiningMatcher<T>(
1503 SafeMatcherCast<T>(matchers.first),
1504 MatcherListTail::template CreateMatcher<T, CombiningMatcher>(
1511template <
typename Matcher1,
typename Matcher2>
1512struct MatcherList<2, Matcher1, Matcher2> {
1513 typedef ::std::pair<Matcher1, Matcher2> ListType;
1515 static ListType BuildList(
const Matcher1& matcher1,
1516 const Matcher2& matcher2) {
1517 return ::std::pair<Matcher1, Matcher2>(matcher1, matcher2);
1520 template <
typename T,
template <
typename >
class CombiningMatcher>
1521 static Matcher<T> CreateMatcher(const ListType& matchers) {
1522 return Matcher<T>(
new CombiningMatcher<T>(
1523 SafeMatcherCast<T>(matchers.first),
1524 SafeMatcherCast<T>(matchers.second)));
1532template <
template <
typename T>
class CombiningMatcher,
typename...
Args>
1533class VariadicMatcher {
1535 VariadicMatcher(
const Args&... matchers)
1536 : matchers_(MatcherListType::BuildList(matchers...)) {}
1541 template <
typename T>
1542 operator Matcher<T>()
const {
1543 return MatcherListType::template CreateMatcher<T, CombiningMatcher>(
1548 typedef MatcherList<
sizeof...(Args),
Args...> MatcherListType;
1550 const typename MatcherListType::ListType matchers_;
1555template <
typename...
Args>
1562template <
typename Matcher1,
typename Matcher2>
1566 : matcher1_(matcher1), matcher2_(matcher2) {}
1571 template <
typename T>
1588template <
typename T>
1592 : matcher1_(matcher1), matcher2_(matcher2) {}
1596 matcher1_.DescribeTo(os);
1598 matcher2_.DescribeTo(os);
1604 matcher1_.DescribeNegationTo(os);
1606 matcher2_.DescribeNegationTo(os);
1614 if (matcher1_.MatchAndExplain(x, &listener1)) {
1615 *listener << listener1.
str();
1620 if (matcher2_.MatchAndExplain(x, &listener2)) {
1621 *listener << listener2.
str();
1634 *listener <<
", and " << s2;
1649template <
typename...
Args>
1650using AnyOfMatcher = VariadicMatcher<EitherOfMatcherImpl,
Args...>;
1657template <
typename Matcher1,
typename Matcher2>
1658class EitherOfMatcher {
1661 : matcher1_(matcher1), matcher2_(matcher2) {}
1666 template <
typename T>
1681template <
typename Predicate>
1690 template <
typename T>
1705 *os <<
"satisfies the given predicate";
1709 *os <<
"doesn't satisfy the given predicate";
1713 Predicate predicate_;
1720template <
typename M>
1721class MatcherAsPredicate {
1731 template <
typename T>
1758template <
typename M>
1759class PredicateFormatterFromMatcher {
1766 template <
typename T>
1784 ::std::stringstream ss;
1785 ss <<
"Value of: " << value_text <<
"\n"
1787 matcher.DescribeTo(&ss);
1788 ss <<
"\n Actual: " << listener.
str();
1801template <
typename M>
1802inline PredicateFormatterFromMatcher<M>
1804 return PredicateFormatterFromMatcher<M>(matcher);
1811template <
typename FloatType>
1812class FloatingEqMatcher {
1821 rhs_(rhs), nan_eq_nan_(nan_eq_nan), max_abs_error_(-1) {
1828 rhs_(rhs), nan_eq_nan_(nan_eq_nan), max_abs_error_(max_abs_error) {
1830 <<
", where max_abs_error is" << max_abs_error;
1834 template <
typename T>
1837 Impl(FloatType rhs,
bool nan_eq_nan, FloatType max_abs_error) :
1838 rhs_(rhs), nan_eq_nan_(nan_eq_nan), max_abs_error_(max_abs_error) {}
1845 if (lhs.is_nan() || rhs.
is_nan()) {
1846 if (lhs.is_nan() && rhs.
is_nan()) {
1852 if (HasMaxAbsError()) {
1857 return value == rhs_ || fabs(
value - rhs_) <= max_abs_error_;
1859 return lhs.AlmostEquals(rhs);
1867 const ::std::streamsize old_precision = os->precision(
1868 ::std::numeric_limits<FloatType>::digits10 + 2);
1873 *os <<
"never matches";
1876 *os <<
"is approximately " << rhs_;
1877 if (HasMaxAbsError()) {
1878 *os <<
" (absolute error <= " << max_abs_error_ <<
")";
1881 os->precision(old_precision);
1886 const ::std::streamsize old_precision = os->precision(
1887 ::std::numeric_limits<FloatType>::digits10 + 2);
1892 *os <<
"is anything";
1895 *os <<
"isn't approximately " << rhs_;
1896 if (HasMaxAbsError()) {
1897 *os <<
" (absolute error > " << max_abs_error_ <<
")";
1901 os->precision(old_precision);
1905 bool HasMaxAbsError()
const {
1906 return max_abs_error_ >= 0;
1909 const FloatType rhs_;
1910 const bool nan_eq_nan_;
1912 const FloatType max_abs_error_;
1937 const FloatType rhs_;
1938 const bool nan_eq_nan_;
1940 const FloatType max_abs_error_;
1947template <
typename InnerMatcher>
1948class PointeeMatcher {
1960 template <
typename Po
inter>
1967 template <
typename Po
inter>
1973 explicit Impl(
const InnerMatcher& matcher)
1976 virtual void DescribeTo(::std::ostream* os)
const {
1977 *os <<
"points to a value that ";
1981 virtual void DescribeNegationTo(::std::ostream* os)
const {
1982 *os <<
"does not point to a value that ";
1986 virtual bool MatchAndExplain(Pointer pointer,
1987 MatchResultListener* listener)
const {
1991 *listener <<
"which points to ";
1996 const Matcher<const Pointee&> matcher_;
2001 const InnerMatcher matcher_;
2008template <
typename Class,
typename FieldType>
2013 : field_(field), matcher_(matcher) {}
2016 *os <<
"is an object whose given field ";
2017 matcher_.DescribeTo(os);
2021 *os <<
"is an object whose given field ";
2022 matcher_.DescribeNegationTo(os);
2025 template <
typename T>
2027 return MatchAndExplainImpl(
2028 typename ::testing::internal::
2037 bool MatchAndExplainImpl(
false_type ,
const Class& obj,
2039 *listener <<
"whose given field is ";
2043 bool MatchAndExplainImpl(
true_type ,
const Class* p,
2048 *listener <<
"which points to an object ";
2052 return MatchAndExplainImpl(
false_type(), *p, listener);
2055 const FieldType Class::*field_;
2056 const Matcher<const FieldType&> matcher_;
2063template <
typename Class,
typename PropertyType>
2074 : property_(property), matcher_(matcher) {}
2077 *os <<
"is an object whose given property ";
2078 matcher_.DescribeTo(os);
2082 *os <<
"is an object whose given property ";
2083 matcher_.DescribeNegationTo(os);
2086 template <
typename T>
2088 return MatchAndExplainImpl(
2089 typename ::testing::internal::
2098 bool MatchAndExplainImpl(
false_type ,
const Class& obj,
2100 *listener <<
"whose given property is ";
2103 RefToConstProperty result = (obj.*property_)();
2107 bool MatchAndExplainImpl(
true_type ,
const Class* p,
2112 *listener <<
"which points to an object ";
2116 return MatchAndExplainImpl(
false_type(), *p, listener);
2119 PropertyType (Class::*property_)()
const;
2120 const Matcher<RefToConstProperty> matcher_;
2129template <
typename Functor>
2135 template <
typename T>
2140template <
typename ArgType,
typename ResType>
2141struct CallableTraits<ResType(*)(ArgType)> {
2147 <<
"NULL function pointer is passed into ResultOf().";
2149 template <
typename T>
2150 static ResType
Invoke(ResType(*f)(ArgType), T arg) {
2157template <
typename Callable>
2158class ResultOfMatcher {
2163 : callable_(callable), matcher_(matcher) {
2167 template <
typename T>
2169 return Matcher<T>(
new Impl<T>(callable_, matcher_));
2175 template <
typename T>
2179 : callable_(callable), matcher_(matcher) {}
2181 virtual void DescribeTo(::std::ostream* os)
const {
2182 *os <<
"is mapped by the given callable to a value that ";
2186 virtual void DescribeNegationTo(::std::ostream* os)
const {
2187 *os <<
"is mapped by the given callable to a value that ";
2191 virtual bool MatchAndExplain(T obj, MatchResultListener* listener)
const {
2192 *listener <<
"which is mapped by the given callable to ";
2196 CallableTraits<Callable>::template
Invoke<T>(callable_, obj);
2206 mutable CallableStorageType callable_;
2207 const Matcher<ResultType> matcher_;
2212 const CallableStorageType callable_;
2213 const Matcher<ResultType> matcher_;
2219template <
typename SizeMatcher>
2223 : size_matcher_(size_matcher) {
2226 template <
typename Container>
2231 template <
typename Container>
2236 typedef typename ContainerView::type::size_type
SizeType;
2237 explicit Impl(
const SizeMatcher& size_matcher)
2242 size_matcher_.DescribeTo(os);
2246 size_matcher_.DescribeNegationTo(os);
2253 const bool result = size_matcher_.MatchAndExplain(size, &size_listener);
2255 <<
"whose size " << size << (result ?
" matches" :
" doesn't match");
2266 const SizeMatcher size_matcher_;
2280template <
typename Container>
2281class ContainerEqMatcher {
2301 *os <<
"does not equal ";
2305 template <
typename LhsContainer>
2312 typedef typename LhsView::type LhsStlContainer;
2314 if (lhs_stl_container == rhs_)
2317 ::std::ostream*
const os = listener->stream();
2320 bool printed_header =
false;
2321 for (
typename LhsStlContainer::const_iterator it =
2322 lhs_stl_container.begin();
2323 it != lhs_stl_container.end(); ++it) {
2326 if (printed_header) {
2329 *os <<
"which has these unexpected elements: ";
2330 printed_header =
true;
2337 bool printed_header2 =
false;
2338 for (
typename StlContainer::const_iterator it = rhs_.begin();
2339 it != rhs_.end(); ++it) {
2341 lhs_stl_container.begin(), lhs_stl_container.end(), *it) ==
2342 lhs_stl_container.end()) {
2343 if (printed_header2) {
2346 *os << (printed_header ?
",\nand" :
"which")
2347 <<
" doesn't have these expected elements: ";
2348 printed_header2 =
true;
2365struct LessComparator {
2366 template <
typename T,
typename U>
2367 bool operator()(
const T& lhs,
const U& rhs)
const {
return lhs < rhs; }
2371template <
typename Comparator,
typename ContainerMatcher>
2372class WhenSortedByMatcher {
2375 const ContainerMatcher& matcher)
2376 : comparator_(comparator), matcher_(matcher) {}
2378 template <
typename LhsContainer>
2383 template <
typename LhsContainer>
2395 Impl(
const Comparator& comparator,
const ContainerMatcher& matcher)
2396 : comparator_(comparator), matcher_(matcher) {}
2399 *os <<
"(when sorted) ";
2400 matcher_.DescribeTo(os);
2404 *os <<
"(when sorted) ";
2405 matcher_.DescribeNegationTo(os);
2411 ::std::vector<LhsValue> sorted_container(lhs_stl_container.begin(),
2412 lhs_stl_container.end());
2414 sorted_container.begin(), sorted_container.end(), comparator_);
2416 if (!listener->IsInterested()) {
2419 return matcher_.Matches(sorted_container);
2422 *listener <<
"which is ";
2424 *listener <<
" when sorted";
2427 const bool match = matcher_.MatchAndExplain(sorted_container,
2434 const Comparator comparator_;
2441 const Comparator comparator_;
2442 const ContainerMatcher matcher_;
2451template <
typename TupleMatcher,
typename RhsContainer>
2452class PointwiseMatcher {
2461 : tuple_matcher_(tuple_matcher), rhs_(
RhsView::Copy(rhs)) {
2468 template <
typename LhsContainer>
2473 template <
typename LhsContainer>
2493 *os <<
"contains " << rhs_.size()
2494 <<
" values, where each value and its corresponding value in ";
2497 mono_tuple_matcher_.DescribeTo(os);
2500 *os <<
"doesn't contain exactly " << rhs_.size()
2501 <<
" values, or contains a value x at some index i"
2502 <<
" where x and the i-th value of ";
2505 mono_tuple_matcher_.DescribeNegationTo(os);
2511 const size_t actual_size = lhs_stl_container.size();
2512 if (actual_size != rhs_.size()) {
2513 *listener <<
"which contains " << actual_size <<
" values";
2517 typename LhsStlContainer::const_iterator left = lhs_stl_container.begin();
2518 typename RhsStlContainer::const_iterator right = rhs_.begin();
2519 for (
size_t i = 0; i != actual_size; ++i, ++left, ++right) {
2522 if (listener->IsInterested()) {
2524 if (!mono_tuple_matcher_.MatchAndExplain(
2525 value_pair, &inner_listener)) {
2526 *listener <<
"where the value pair (";
2530 *listener <<
") at index #" << i <<
" don't match";
2535 if (!mono_tuple_matcher_.Matches(value_pair))
2551 const TupleMatcher tuple_matcher_;
2558template <
typename Container>
2565 typedef typename StlContainer::value_type
Element;
2567 template <
typename InnerMatcher>
2576 Container container,
2580 for (
typename StlContainer::const_iterator it = stl_container.begin();
2581 it != stl_container.end(); ++it, ++i) {
2583 const bool matches =
inner_matcher_.MatchAndExplain(*it, &inner_listener);
2585 if (matches != all_elements_should_match) {
2586 *listener <<
"whose element #" << i
2587 << (matches ?
" matches" :
" doesn't match");
2589 return !all_elements_should_match;
2592 return all_elements_should_match;
2603template <
typename Container>
2606 template <
typename InnerMatcher>
2612 *os <<
"contains at least one element that ";
2617 *os <<
"doesn't contain any element that ";
2632template <
typename Container>
2633class EachMatcherImpl :
public QuantifierMatcherImpl<Container> {
2635 template <
typename InnerMatcher>
2641 *os <<
"only contains elements that ";
2646 *os <<
"contains some element that ";
2660template <
typename M>
2661class ContainsMatcher {
2665 template <
typename Container>
2671 const M inner_matcher_;
2677template <
typename M>
2682 template <
typename Container>
2688 const M inner_matcher_;
2697template <
typename PairType>
2703 template <
typename InnerMatcher>
2713 const bool match = inner_matcher_.MatchAndExplain(key_value.first,
2716 if (explanation !=
"") {
2717 *listener <<
"whose first field is a value " << explanation;
2724 *os <<
"has a key that ";
2725 inner_matcher_.DescribeTo(os);
2730 *os <<
"doesn't have a key that ";
2731 inner_matcher_.DescribeTo(os);
2741template <
typename M>
2746 template <
typename PairType>
2752 const M matcher_for_key_;
2759template <
typename PairType>
2766 template <
typename FirstMatcher,
typename SecondMatcher>
2776 *os <<
"has a first field that ";
2777 first_matcher_.DescribeTo(os);
2778 *os <<
", and has a second field that ";
2779 second_matcher_.DescribeTo(os);
2784 *os <<
"has a first field that ";
2785 first_matcher_.DescribeNegationTo(os);
2786 *os <<
", or has a second field that ";
2787 second_matcher_.DescribeNegationTo(os);
2794 if (!listener->IsInterested()) {
2797 return first_matcher_.Matches(a_pair.first) &&
2798 second_matcher_.Matches(a_pair.second);
2801 if (!first_matcher_.MatchAndExplain(a_pair.first,
2802 &first_inner_listener)) {
2803 *listener <<
"whose first field does not match";
2808 if (!second_matcher_.MatchAndExplain(a_pair.second,
2809 &second_inner_listener)) {
2810 *listener <<
"whose second field does not match";
2814 ExplainSuccess(first_inner_listener.
str(), second_inner_listener.
str(),
2823 *listener <<
"whose both fields match";
2824 if (first_explanation !=
"") {
2825 *listener <<
", where the first field is a value " << first_explanation;
2827 if (second_explanation !=
"") {
2829 if (first_explanation !=
"") {
2830 *listener <<
"and ";
2832 *listener <<
"where ";
2834 *listener <<
"the second field is a value " << second_explanation;
2838 const Matcher<const FirstType&> first_matcher_;
2839 const Matcher<const SecondType&> second_matcher_;
2845template <
typename FirstMatcher,
typename SecondMatcher>
2849 : first_matcher_(first_matcher), second_matcher_(second_matcher) {}
2851 template <
typename PairType>
2855 first_matcher_, second_matcher_));
2859 const FirstMatcher first_matcher_;
2860 const SecondMatcher second_matcher_;
2866template <
typename Container>
2873 typedef typename StlContainer::value_type
Element;
2877 template <
typename InputIter>
2879 while (first != last) {
2888 }
else if (count() == 1) {
2889 *os <<
"has 1 element that ";
2890 matchers_[0].DescribeTo(os);
2892 *os <<
"has " << Elements(count()) <<
" where\n";
2893 for (
size_t i = 0; i != count(); ++i) {
2894 *os <<
"element #" << i <<
" ";
2895 matchers_[i].DescribeTo(os);
2896 if (i + 1 < count()) {
2906 *os <<
"isn't empty";
2910 *os <<
"doesn't have " << Elements(count()) <<
", or\n";
2911 for (
size_t i = 0; i != count(); ++i) {
2912 *os <<
"element #" << i <<
" ";
2913 matchers_[i].DescribeNegationTo(os);
2914 if (i + 1 < count()) {
2925 const bool listener_interested = listener->IsInterested();
2928 ::std::vector<internal::string> explanations(count());
2930 typename StlContainer::const_iterator it = stl_container.begin();
2931 size_t exam_pos = 0;
2932 bool mismatch_found =
false;
2937 for (; it != stl_container.end() && exam_pos != count(); ++it, ++exam_pos) {
2939 if (listener_interested) {
2941 match = matchers_[exam_pos].MatchAndExplain(*it, &s);
2942 explanations[exam_pos] = s.
str();
2944 match = matchers_[exam_pos].Matches(*it);
2948 mismatch_found =
true;
2957 size_t actual_count = exam_pos;
2958 for (; it != stl_container.end(); ++it) {
2962 if (actual_count != count()) {
2967 if (listener_interested && (actual_count != 0)) {
2968 *listener <<
"which has " << Elements(actual_count);
2973 if (mismatch_found) {
2975 if (listener_interested) {
2976 *listener <<
"whose element #" << exam_pos <<
" doesn't match";
2984 if (listener_interested) {
2985 bool reason_printed =
false;
2986 for (
size_t i = 0; i != count(); ++i) {
2989 if (reason_printed) {
2990 *listener <<
",\nand ";
2992 *listener <<
"whose element #" << i <<
" matches, " << s;
2993 reason_printed =
true;
3001 static Message Elements(
size_t count) {
3002 return Message() << count << (count == 1 ?
" element" :
" elements");
3005 size_t count()
const {
return matchers_.size(); }
3007 ::std::vector<Matcher<const Element&> > matchers_;
3019 : num_elements_(num_elements),
3020 num_matchers_(num_matchers),
3021 matched_(num_elements_* num_matchers_, 0) {
3027 return matched_[SpaceIndex(ilhs, irhs)] == 1;
3030 matched_[SpaceIndex(ilhs, irhs)] = b ? 1 : 0;
3043 size_t SpaceIndex(
size_t ilhs,
size_t irhs)
const {
3044 return ilhs * num_matchers_ + irhs;
3047 size_t num_elements_;
3048 size_t num_matchers_;
3053 ::std::vector<char> matched_;
3070class GTEST_API_ UnorderedElementsAreMatcherImplBase {
3084 const ::std::vector<string>& element_printouts,
3089 return matcher_describers_;
3093 return Message() << n <<
" element" << (n == 1 ?
"" :
"s");
3097 MatcherDescriberVec matcher_describers_;
3103template <
typename Container>
3104class UnorderedElementsAreMatcherImpl
3106 public UnorderedElementsAreMatcherImplBase {
3113 typedef typename StlContainer::value_type
Element;
3117 template <
typename InputIter>
3119 for (; first != last; ++first) {
3138 ::std::vector<string> element_printouts;
3139 MatchMatrix matrix = AnalyzeElements(stl_container.begin(),
3140 stl_container.end(),
3144 const size_t actual_count = matrix.
LhsSize();
3145 if (actual_count == 0 && matchers_.empty()) {
3148 if (actual_count != matchers_.size()) {
3153 if (actual_count != 0 && listener->IsInterested()) {
3154 *listener <<
"which has " <<
Elements(actual_count);
3160 matrix, listener) &&
3165 typedef ::std::vector<Matcher<const Element&> > MatcherVec;
3167 template <
typename ElementIter>
3168 MatchMatrix AnalyzeElements(ElementIter elem_first, ElementIter elem_last,
3169 ::std::vector<string>* element_printouts,
3171 element_printouts->clear();
3172 ::std::vector<char> did_match;
3173 size_t num_elements = 0;
3174 for (; elem_first != elem_last; ++num_elements, ++elem_first) {
3175 if (listener->IsInterested()) {
3178 for (
size_t irhs = 0; irhs != matchers_.size(); ++irhs) {
3179 did_match.push_back(
Matches(matchers_[irhs])(*elem_first));
3183 MatchMatrix matrix(num_elements, matchers_.size());
3184 ::std::vector<char>::const_iterator did_match_iter = did_match.begin();
3185 for (
size_t ilhs = 0; ilhs != num_elements; ++ilhs) {
3186 for (
size_t irhs = 0; irhs != matchers_.size(); ++irhs) {
3187 matrix.SetEdge(ilhs, irhs, *did_match_iter++ != 0);
3193 MatcherVec matchers_;
3200template <
typename Target>
3202 template <
typename Arg>
3209template <
typename MatcherTuple>
3210class UnorderedElementsAreMatcher {
3213 : matchers_(args) {}
3215 template <
typename Container>
3219 typedef typename View::value_type Element;
3220 typedef ::std::vector<Matcher<const Element&> > MatcherVec;
3221 MatcherVec matchers;
3224 ::std::back_inserter(matchers));
3226 matchers.begin(), matchers.end()));
3235template <
typename MatcherTuple>
3236class ElementsAreMatcher {
3240 template <
typename Container>
3244 typedef typename View::value_type Element;
3245 typedef ::std::vector<Matcher<const Element&> > MatcherVec;
3246 MatcherVec matchers;
3249 ::std::back_inserter(matchers));
3251 matchers.begin(), matchers.end()));
3260template <
typename T>
3261class UnorderedElementsAreArrayMatcher {
3265 template <
typename Iter>
3267 : matchers_(first, last) {}
3269 template <
typename Container>
3277 ::std::vector<T> matchers_;
3283template <
typename T>
3284class ElementsAreArrayMatcher {
3286 template <
typename Iter>
3289 template <
typename Container>
3292 matchers_.begin(), matchers_.end()));
3296 const ::std::vector<T> matchers_;
3307 const char* matcher_name,
3308 const Strings& param_values);
3327template <
typename Iter>
3328inline internal::ElementsAreArrayMatcher<
3329 typename ::std::iterator_traits<Iter>::value_type>
3331 typedef typename ::std::iterator_traits<Iter>::value_type T;
3332 return internal::ElementsAreArrayMatcher<T>(first, last);
3335template <
typename T>
3337 const T* pointer,
size_t count) {
3341template <
typename T,
size_t N>
3343 const T (&array)[N]) {
3347template <
typename T,
typename A>
3349 const ::std::vector<T, A>& vec) {
3354template <
typename T>
3369template <
typename Iter>
3371 typename ::std::iterator_traits<Iter>::value_type>
3373 typedef typename ::std::iterator_traits<Iter>::value_type T;
3377template <
typename T>
3383template <
typename T,
size_t N>
3389template <
typename T,
typename A>
3396template <
typename T>
3414template <
typename T>
3418template <
typename T>
3424template <
typename T>
3425inline internal::EqMatcher<T>
Eq(T x) {
return internal::EqMatcher<T>(x); }
3429template <
typename T>
3444template <
typename Lhs,
typename Rhs>
3448template <
typename Rhs>
3449inline internal::GeMatcher<Rhs>
Ge(Rhs x) {
3450 return internal::GeMatcher<Rhs>(x);
3454template <
typename Rhs>
3455inline internal::GtMatcher<Rhs>
Gt(Rhs x) {
3456 return internal::GtMatcher<Rhs>(x);
3460template <
typename Rhs>
3461inline internal::LeMatcher<Rhs>
Le(Rhs x) {
3462 return internal::LeMatcher<Rhs>(x);
3466template <
typename Rhs>
3467inline internal::LtMatcher<Rhs>
Lt(Rhs x) {
3468 return internal::LtMatcher<Rhs>(x);
3472template <
typename Rhs>
3473inline internal::NeMatcher<Rhs>
Ne(Rhs x) {
3474 return internal::NeMatcher<Rhs>(x);
3491template <
typename T>
3512 double rhs,
double max_abs_error) {
3520 double rhs,
double max_abs_error) {
3540 float rhs,
float max_abs_error) {
3548 float rhs,
float max_abs_error) {
3554template <
typename InnerMatcher>
3556 const InnerMatcher& inner_matcher) {
3564template <
typename Class,
typename FieldType,
typename FieldMatcher>
3567 FieldType Class::*field,
const FieldMatcher& matcher) {
3581template <
typename Class,
typename PropertyType,
typename PropertyMatcher>
3584 PropertyType (Class::*property)()
const,
const PropertyMatcher& matcher) {
3608template <
typename Callable,
typename ResultOfMatcher>
3610 Callable callable,
const ResultOfMatcher& matcher) {
3648 str,
false,
false));
3695#if GTEST_HAS_GLOBAL_WSTRING || GTEST_HAS_STD_WSTRING
3723 str,
false,
false));
3752inline internal::Eq2Matcher
Eq() {
return internal::Eq2Matcher(); }
3756inline internal::Ge2Matcher
Ge() {
return internal::Ge2Matcher(); }
3760inline internal::Gt2Matcher
Gt() {
return internal::Gt2Matcher(); }
3764inline internal::Le2Matcher
Le() {
return internal::Le2Matcher(); }
3768inline internal::Lt2Matcher
Lt() {
return internal::Lt2Matcher(); }
3772inline internal::Ne2Matcher
Ne() {
return internal::Ne2Matcher(); }
3776template <
typename InnerMatcher>
3784template <
typename Predicate>
3786Truly(Predicate pred) {
3796template <
typename SizeMatcher>
3798SizeIs(
const SizeMatcher& size_matcher) {
3806template <
typename Container>
3819template <
typename Comparator,
typename ContainerMatcher>
3822 const ContainerMatcher& container_matcher) {
3824 comparator, container_matcher);
3829template <
typename ContainerMatcher>
3831WhenSorted(
const ContainerMatcher& container_matcher) {
3843template <
typename TupleMatcher,
typename Container>
3846Pointwise(
const TupleMatcher& tuple_matcher,
const Container& rhs) {
3851 tuple_matcher, rhs);
3872template <
typename M>
3904template <
typename M>
3912template <
typename M>
3922template <
typename FirstMatcher,
typename SecondMatcher>
3924Pair(FirstMatcher first_matcher, SecondMatcher second_matcher) {
3926 first_matcher, second_matcher);
3931template <
typename M>
3937template <
typename T,
typename M>
3938inline bool Value(
const T& value, M matcher) {
3944template <
typename T,
typename M>
3953template <
typename...
Args>
3954inline internal::AllOfMatcher<
Args...>
AllOf(
const Args&... matchers) {
3955 return internal::AllOfMatcher<
Args...>(matchers...);
3958template <
typename...
Args>
3959inline internal::AnyOfMatcher<
Args...>
AnyOf(
const Args&... matchers) {
3960 return internal::AnyOfMatcher<
Args...>(matchers...);
3972template <
typename InnerMatcher>
3973inline InnerMatcher
AllArgs(
const InnerMatcher& matcher) {
return matcher; }
3979#define ASSERT_THAT(value, matcher) ASSERT_PRED_FORMAT1(\
3980 ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)
3981#define EXPECT_THAT(value, matcher) EXPECT_PRED_FORMAT1(\
3982 ::testing::internal::MakePredicateFormatterFromMatcher(matcher), value)
Definition dsd/test/gtest/include/gtest/gtest.h:256
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:80
MatchResultListener(::std::ostream *os)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:85
::std::ostream * stream()
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:98
virtual ~MatchResultListener()=0
MatchResultListener & operator<<(const T &x)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:91
virtual ~MatchResultListener()=0
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:112
bool IsInterested() const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:104
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:117
virtual void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:134
virtual void DescribeTo(::std::ostream *os) const =0
virtual ~MatcherDescriberInterface()
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:119
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:143
virtual bool MatchAndExplain(T x, MatchResultListener *listener) const =0
Matcher()
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:317
Matcher(const internal::string &s)
Matcher(const MatcherInterface< const internal::string & > *impl)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:319
Matcher(const MatcherInterface< internal::string > *impl)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:336
Matcher()
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:334
Matcher(const internal::string &s)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:294
Matcher()
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:299
Matcher(const MatcherInterface< T > *impl)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:302
Definition dsd/test/gtest/include/gtest/gtest-message.h:85
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:405
PolymorphicMatcher(const Impl &an_impl)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:407
Impl & mutable_impl()
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:411
const Impl & impl() const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:415
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:597
static Matcher< T > Cast(const Matcher< U > &matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:616
static Matcher< T > Cast(M polymorphic_matcher_or_value)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:602
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:184
StringMatchResultListener()
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:186
internal::string str() const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:189
void Clear()
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:192
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:840
virtual void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:844
virtual bool MatchAndExplain(T, MatchResultListener *) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:842
virtual void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:845
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:857
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1417
virtual void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1422
BothOfMatcherImpl(const Matcher< T > &matcher1, const Matcher< T > &matcher2)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1419
virtual bool MatchAndExplain(T x, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1438
virtual void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1430
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1563
BothOfMatcher(Matcher1 matcher1, Matcher2 matcher2)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1565
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2281
internal::StlContainerView< Container > View
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2283
void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2296
bool MatchAndExplain(const LhsContainer &lhs, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2306
void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2300
View::type StlContainer
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2284
View::const_reference StlContainerReference
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2285
ContainerEqMatcher(const Container &rhs)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2289
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2604
virtual bool MatchAndExplain(Container container, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2621
ContainsMatcherImpl(InnerMatcher inner_matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2607
virtual void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2616
virtual void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2611
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2661
ContainsMatcher(M m)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2663
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:203
DummyMatchResultListener()
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:205
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2633
virtual bool MatchAndExplain(Container container, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2650
virtual void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2645
virtual void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2640
EachMatcherImpl(InnerMatcher inner_matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2636
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2678
EachMatcher(M m)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2680
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1589
virtual void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1594
virtual void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1602
virtual bool MatchAndExplain(T x, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1610
EitherOfMatcherImpl(const Matcher< T > &matcher1, const Matcher< T > &matcher2)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1591
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1658
EitherOfMatcher(Matcher1 matcher1, Matcher2 matcher2)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1660
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3284
ElementsAreArrayMatcher(Iter first, Iter last)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:3287
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2867
View::type StlContainer
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2871
virtual bool MatchAndExplain(Container container, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2920
virtual void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2885
internal::StlContainerView< RawContainer > View
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2870
typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer
StlContainer::value_type Element
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2873
virtual void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2904
ElementsAreMatcherImpl(InputIter first, InputIter last)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2878
View::const_reference StlContainerReference
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2872
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3236
ElementsAreMatcher(const MatcherTuple &args)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:3238
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1219
bool MatchAndExplain(const MatcheeStringType &s, MatchResultListener *) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1238
EndsWithMatcher(const StringType &suffix)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1221
bool MatchAndExplain(CharType *s, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1229
void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1245
void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1250
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2009
void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2020
bool MatchAndExplain(const T &value, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2026
FieldMatcher(FieldType Class::*field, const Matcher< const FieldType & > &matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2011
void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2015
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1835
virtual void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1884
virtual bool MatchAndExplain(T value, MatchResultListener *) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1840
virtual void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1863
Impl(FloatType rhs, bool nan_eq_nan, FloatType max_abs_error)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1837
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1812
FloatingEqMatcher(FloatType rhs, bool nan_eq_nan)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1820
FloatingEqMatcher(FloatType rhs, bool nan_eq_nan, FloatType max_abs_error)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1827
Definition dsd/test/gtest/include/gtest/internal/gtest-internal.h:232
bool is_nan() const
Definition dsd/test/gtest/include/gtest/internal/gtest-internal.h:316
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1125
bool MatchAndExplain(const MatcheeStringType &s, MatchResultListener *) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1145
void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1152
HasSubstrMatcher(const StringType &substring)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1127
bool MatchAndExplain(CharType *s, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1136
void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1157
Definition dsd/test/gtest/include/gtest/internal/gtest-internal.h:779
static const bool value
Definition dsd/test/gtest/include/gtest/internal/gtest-internal.h:821
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:923
void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:931
void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:932
bool MatchAndExplain(const Pointer &p, MatchResultListener *) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:926
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2698
typedef GTEST_REMOVE_REFERENCE_AND_CONST_(PairType) RawPairType
virtual void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2729
KeyMatcherImpl(InnerMatcher inner_matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2704
RawPairType::first_type KeyType
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2701
virtual bool MatchAndExplain(PairType key_value, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2710
virtual void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2723
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2742
KeyMatcher(M m)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2744
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3016
size_t LhsSize() const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:3024
bool HasEdge(size_t ilhs, size_t irhs) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:3026
string DebugString() const
void SetEdge(size_t ilhs, size_t irhs, bool b)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:3029
MatchMatrix(size_t num_elements, size_t num_matchers)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:3018
size_t RhsSize() const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:3025
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1721
MatcherAsPredicate(M matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1723
bool operator()(const T &x) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1732
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:227
bool MatchAndExplain(T x, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:231
bool Matches(T x) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:236
virtual ~MatcherBase()
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:269
MatcherBase()
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:263
void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:242
void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:245
void ExplainMatchResultTo(T x, ::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:250
const MatcherDescriberInterface * GetDescriber() const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:258
MatcherBase(const MatcherInterface< T > *impl)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:266
static Matcher< T > Cast(const Matcher< T > &matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:575
static Matcher< T > Cast(const Matcher< U > &source_matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:540
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:490
static Matcher< T > Cast(M polymorphic_matcher_or_value)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:492
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1264
bool MatchAndExplain(CharType *s, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1275
bool MatchAndExplain(const MatcheeStringType &s, MatchResultListener *) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1284
void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1297
void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1291
MatchesRegexMatcher(const RE *regex, bool full_match)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1266
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1369
virtual void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1378
virtual void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1382
NotMatcherImpl(const Matcher< T > &matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1371
virtual bool MatchAndExplain(T x, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1374
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1395
NotMatcher(InnerMatcher matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1397
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:939
void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:948
bool MatchAndExplain(const Pointer &p, MatchResultListener *) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:942
void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:947
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2760
virtual bool MatchAndExplain(PairType a_pair, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2792
virtual void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2783
RawPairType::first_type FirstType
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2763
typedef GTEST_REMOVE_REFERENCE_AND_CONST_(PairType) RawPairType
virtual void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2775
RawPairType::second_type SecondType
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2764
PairMatcherImpl(FirstMatcher first_matcher, SecondMatcher second_matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2767
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2846
PairMatcher(FirstMatcher first_matcher, SecondMatcher second_matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2848
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1948
PointeeMatcher(const InnerMatcher &matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1950
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2474
virtual void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2492
::std::tr1::tuple< const LhsValue &, const RhsValue & > InnerMatcherArg
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2485
LhsView::type LhsStlContainer
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2478
virtual void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2499
virtual bool MatchAndExplain(LhsContainer lhs, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2508
LhsStlContainer::value_type LhsValue
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2480
internal::StlContainerView< GTEST_REMOVE_REFERENCE_AND_CONST_(LhsContainer)> LhsView
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2477
LhsView::const_reference LhsStlContainerReference
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2479
Impl(const TupleMatcher &tuple_matcher, const RhsStlContainer &rhs)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2487
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2452
internal::StlContainerView< RhsContainer > RhsView
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2454
RhsStlContainer::value_type RhsValue
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2456
PointwiseMatcher(const TupleMatcher &tuple_matcher, const RhsContainer &rhs)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2460
RhsView::type RhsStlContainer
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2455
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2064
void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2076
void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2081
PropertyMatcher(PropertyType(Class::*property)() const, const Matcher< RefToConstProperty > &matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2072
typedef GTEST_REFERENCE_TO_CONST_(PropertyType) RefToConstProperty
bool MatchAndExplain(const T &value, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2087
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2559
const Matcher< const Element & > inner_matcher_
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2596
View::const_reference StlContainerReference
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2564
StlContainer::value_type Element
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2565
View::type StlContainer
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2563
StlContainerView< RawContainer > View
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2562
typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer
bool MatchAndExplainImpl(bool all_elements_should_match, Container container, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2575
GTEST_DISALLOW_ASSIGN_(QuantifierMatcherImpl)
QuantifierMatcherImpl(InnerMatcher inner_matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2568
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:926
static bool PartialMatch(const ::std::string &str, const RE &re)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:957
static bool FullMatch(const ::std::string &str, const RE &re)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:954
RefMatcher(T &x)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:980
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:967
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2158
ResultOfMatcher(Callable callable, const Matcher< ResultType > &matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2162
CallableTraits< Callable >::ResultType ResultType
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2160
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2232
virtual void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2244
virtual bool MatchAndExplain(Container container, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2249
ContainerView::type::size_type SizeType
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2236
virtual void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2240
Impl(const SizeMatcher &size_matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2237
internal::StlContainerView< GTEST_REMOVE_REFERENCE_AND_CONST_(Container)> ContainerView
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2235
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2220
SizeIsMatcher(const SizeMatcher &size_matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2222
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1172
bool MatchAndExplain(const MatcheeStringType &s, MatchResultListener *) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1192
bool MatchAndExplain(CharType *s, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1183
void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1204
StartsWithMatcher(const StringType &prefix)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1174
void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1199
Definition dsd/test/gmock/include/gmock/internal/gmock-internal-utils.h:393
Container type
Definition dsd/test/gmock/include/gmock/internal/gmock-internal-utils.h:395
static const_reference ConstReference(const GTEST_REMOVE_REFERENCE_AND_CONST_(LhsContainer) &container)
Definition dsd/test/gmock/include/gmock/internal/gmock-internal-utils.h:398
const type & const_reference
Definition dsd/test/gmock/include/gmock/internal/gmock-internal-utils.h:396
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1064
void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1096
StrEqualityMatcher(const StringType &str, bool expect_eq, bool case_sensitive)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1066
bool MatchAndExplain(CharType *s, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1076
bool MatchAndExplain(const MatcheeStringType &s, MatchResultListener *) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1088
void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1100
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:214
StreamMatchResultListener(::std::ostream *os)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:216
static bool CaseInsensitiveWideCStringEquals(const wchar_t *lhs, const wchar_t *rhs)
static bool CaseInsensitiveCStringEquals(const char *lhs, const char *rhs)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1682
void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1708
TrulyMatcher(Predicate pred)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1684
void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1704
bool MatchAndExplain(T &x, MatchResultListener *) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:1691
static bool Matches(const MatcherTuple &, const ValueTuple &)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:758
static void ExplainMatchFailuresTo(const MatcherTuple &, const ValueTuple &, ::std::ostream *)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:764
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:701
static void ExplainMatchFailuresTo(const MatcherTuple &matchers, const ValueTuple &values, ::std::ostream *os)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:719
static bool Matches(const MatcherTuple &matcher_tuple, const ValueTuple &value_tuple)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:707
static void Print(const T &value, ::std::ostream *os)
Definition dsd/test/gtest/include/gtest/gtest-printers.h:591
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3261
UnorderedElementsAreArrayMatcher()
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:3263
UnorderedElementsAreArrayMatcher(Iter first, Iter last)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:3266
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3070
void DescribeToImpl(::std::ostream *os) const
bool VerifyAllElementsAndMatchersAreMatched(const ::std::vector< string > &element_printouts, const MatchMatrix &matrix, MatchResultListener *listener) const
::std::vector< const MatcherDescriberInterface * > MatcherDescriberVec
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3075
void DescribeNegationToImpl(::std::ostream *os) const
static Message Elements(size_t n)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:3092
MatcherDescriberVec & matcher_describers()
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:3088
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3106
UnorderedElementsAreMatcherImpl(InputIter first, InputIter last)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:3118
virtual void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:3126
virtual bool MatchAndExplain(Container container, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:3135
StlContainer::const_iterator StlContainerConstIterator
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3112
View::type StlContainer
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3110
typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer
View::const_reference StlContainerReference
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3111
StlContainer::value_type Element
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3113
internal::StlContainerView< RawContainer > View
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3109
virtual void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:3131
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3210
UnorderedElementsAreMatcher(const MatcherTuple &args)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:3212
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2384
virtual void DescribeNegationTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2403
LhsView::type LhsStlContainer
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2388
RemoveConstFromKey< typenameLhsStlContainer::value_type >::type LhsValue
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2393
virtual void DescribeTo(::std::ostream *os) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2398
internal::StlContainerView< GTEST_REMOVE_REFERENCE_AND_CONST_(LhsContainer)> LhsView
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2387
Impl(const Comparator &comparator, const ContainerMatcher &matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2395
virtual bool MatchAndExplain(LhsContainer lhs, MatchResultListener *listener) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2408
LhsView::const_reference LhsStlContainerReference
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2389
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2372
WhenSortedByMatcher(const Comparator &comparator, const ContainerMatcher &matcher)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2374
Definition dsd/test/gtest/include/gtest/internal/gtest-linked_ptr.h:136
#define GMOCK_IMPLEMENT_COMPARISON_MATCHER_(name, op, relation, negated_relation)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:876
#define GMOCK_IMPLEMENT_COMPARISON2_MATCHER_(name, op, relation)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1321
#define GMOCK_KIND_OF_(type)
Definition dsd/test/gmock/include/gmock/internal/gmock-internal-utils.h:168
#define GTEST_REMOVE_CONST_(T)
Definition dsd/test/gtest/include/gtest/internal/gtest-internal.h:743
#define GTEST_REMOVE_REFERENCE_(T)
Definition dsd/test/gtest/include/gtest/internal/gtest-internal.h:712
#define GTEST_REMOVE_REFERENCE_AND_CONST_(T)
Definition dsd/test/gtest/include/gtest/internal/gtest-internal.h:747
#define GTEST_REFERENCE_TO_CONST_(T)
Definition dsd/test/gtest/include/gtest/internal/gtest-internal.h:772
#define GTEST_API_
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:768
#define GTEST_CHECK_(condition)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1060
#define GTEST_DISALLOW_ASSIGN_(type)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:721
#define GTEST_COMPILE_ASSERT_(expr, msg)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:815
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:726
Definition dsd/test/gmock/include/gmock/gmock-actions.h:60
bool_constant< true > true_type
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1618
OutIter TransformTupleValues(Func f, const Tuple &t, OutIter out)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:834
bool MatchPrintAndExplain(Value &value, const Matcher< T > &matcher, MatchResultListener *listener)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:676
bool TupleMatches(const MatcherTuple &matcher_tuple, const ValueTuple &value_tuple)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:775
bool IsReadableTypeName(const string &type_name)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:663
PredicateFormatterFromMatcher< M > MakePredicateFormatterFromMatcher(const M &matcher)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1803
void UniversalPrint(const T &value, ::std::ostream *os)
Definition dsd/test/gtest/include/gtest/gtest-printers.h:752
bool CaseInsensitiveStringEquals(const StringType &s1, const StringType &s2)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1040
::std::wstring wstring
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:878
GTEST_API_ string FormatMatcherDescription(bool negation, const char *matcher_name, const Strings ¶m_values)
std::string GetTypeName()
Definition dsd/test/gtest/include/gtest/internal/gtest-type-util.h:64
::std::string string
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:872
bool_constant< false > false_type
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1617
Iter ArrayAwareFind(Iter begin, Iter end, const Element &elem)
Definition dsd/test/gtest/include/gtest/internal/gtest-internal.h:912
To ImplicitCast_(To x)
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1098
::std::pair< size_t, size_t > ElementMatcherPair
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3056
const bool ImplicitlyConvertible< From, To >::value
Definition dsd/test/gtest/include/gtest/internal/gtest-internal.h:826
@ kOther
Definition dsd/test/gmock/include/gmock/internal/gmock-internal-utils.h:127
::std::vector< ElementMatcherPair > ElementMatcherPairs
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3057
const Pointer::element_type * GetRawPointer(const Pointer &p)
Definition dsd/test/gmock/include/gmock/internal/gmock-internal-utils.h:76
GTEST_API_ ElementMatcherPairs FindMaxBipartiteMatching(const MatchMatrix &g)
bool CaseInsensitiveCStringEquals(const char *lhs, const char *rhs)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:1028
GTEST_API_ bool FindPairing(const MatchMatrix &matrix, MatchResultListener *listener)
void PrintIfNotEmpty(const internal::string &explanation, ::std::ostream *os)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:653
void ExplainMatchFailureTupleTo(const MatcherTuple &matchers, const ValueTuple &values, ::std::ostream *os)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:790
Definition dsd/test/gmock/include/gmock/gmock-actions.h:49
PolymorphicMatcher< internal::StartsWithMatcher< internal::string > > StartsWith(const internal::string &prefix)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3661
internal::NotMatcher< InnerMatcher > Not(InnerMatcher m)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3777
internal::Le2Matcher Le()
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3764
internal::PointwiseMatcher< TupleMatcher, GTEST_REMOVE_CONST_(Container)> Pointwise(const TupleMatcher &tuple_matcher, const Container &rhs)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3846
Matcher< Lhs > TypedEq(const Rhs &rhs)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3445
Matcher< T > An()
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3419
internal::Ne2Matcher Ne()
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3772
internal::FloatingEqMatcher< float > FloatEq(float rhs)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3526
PolymorphicMatcher< internal::NotNullMatcher > NotNull()
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3485
internal::WhenSortedByMatcher< Comparator, ContainerMatcher > WhenSortedBy(const Comparator &comparator, const ContainerMatcher &container_matcher)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3821
InnerMatcher AllArgs(const InnerMatcher &matcher)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3973
PolymorphicMatcher< internal::HasSubstrMatcher< internal::string > > HasSubstr(const internal::string &substring)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3654
PolymorphicMatcher< internal::IsNullMatcher > IsNull()
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3478
PolymorphicMatcher< internal::StrEqualityMatcher< internal::string > > StrCaseNe(const internal::string &str)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3646
internal::WhenSortedByMatcher< internal::LessComparator, ContainerMatcher > WhenSorted(const ContainerMatcher &container_matcher)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3831
internal::FloatingEqMatcher< float > NanSensitiveFloatEq(float rhs)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3532
internal::FloatingEqMatcher< float > NanSensitiveFloatNear(float rhs, float max_abs_error)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3547
internal::EachMatcher< M > Each(M matcher)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3905
internal::Lt2Matcher Lt()
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3768
internal::Gt2Matcher Gt()
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3760
internal::FloatingEqMatcher< double > DoubleNear(double rhs, double max_abs_error)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3511
PolymorphicMatcher< internal::MatchesRegexMatcher > MatchesRegex(const internal::RE *regex)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3675
PolymorphicMatcher< internal::TrulyMatcher< Predicate > > Truly(Predicate pred)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3786
const internal::AnythingMatcher _
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3412
PolymorphicMatcher< internal::ContainerEqMatcher< GTEST_REMOVE_CONST_(Container)> > ContainerEq(const Container &rhs)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3809
internal::FloatingEqMatcher< double > DoubleEq(double rhs)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3498
internal::AllOfResult2< M1, M2 >::type AllOf(M1 m1, M2 m2)
Definition dsd/test/gmock/include/gmock/gmock-generated-matchers.h:1013
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
Definition dsd/test/gmock/include/gmock/gmock-generated-matchers.h:492
Matcher< T > A()
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3415
internal::ResultOfMatcher< Callable > ResultOf(Callable callable, const ResultOfMatcher &matcher)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3609
bool StaticAssertTypeEq()
Definition dsd/test/gtest/include/gtest/gtest.h:2205
PolymorphicMatcher< internal::StrEqualityMatcher< internal::string > > StrNe(const internal::string &str)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3632
bool ExplainMatchResult(M matcher, const T &value, MatchResultListener *listener)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3945
internal::ElementsAreArrayMatcher< typename ::std::iterator_traits< Iter >::value_type > ElementsAreArray(Iter first, Iter last)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3330
GTEST_API_ AssertionResult AssertionSuccess()
internal::FloatingEqMatcher< double > NanSensitiveDoubleEq(double rhs)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3504
internal::FloatingEqMatcher< float > FloatNear(float rhs, float max_abs_error)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3539
internal::Ge2Matcher Ge()
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3756
PolymorphicMatcher< internal::MatchesRegexMatcher > ContainsRegex(const internal::RE *regex)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3686
GTEST_API_ AssertionResult AssertionFailure()
internal::KeyMatcher< M > Key(M inner_matcher)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3913
internal::SizeIsMatcher< SizeMatcher > SizeIs(const SizeMatcher &size_matcher)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3798
PolymorphicMatcher< internal::StrEqualityMatcher< internal::string > > StrCaseEq(const internal::string &str)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3639
Matcher< T > MatcherCast(M matcher)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:585
::std::string PrintToString(const T &value)
Definition dsd/test/gtest/include/gtest/gtest-printers.h:847
internal::ContainsMatcher< M > Contains(M matcher)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3873
internal::Eq2Matcher Eq()
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3752
PolymorphicMatcher< internal::PropertyMatcher< Class, PropertyType > > Property(PropertyType(Class::*property)() const, const PropertyMatcher &matcher)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3583
internal::PairMatcher< FirstMatcher, SecondMatcher > Pair(FirstMatcher first_matcher, SecondMatcher second_matcher)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3924
PolymorphicMatcher< Impl > MakePolymorphicMatcher(const Impl &impl)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:471
PolymorphicMatcher< internal::EndsWithMatcher< internal::string > > EndsWith(const internal::string &suffix)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3668
PolymorphicMatcher< internal::FieldMatcher< Class, FieldType > > Field(FieldType Class::*field, const FieldMatcher &matcher)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3566
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
Definition dsd/test/gmock/include/gmock/gmock-more-actions.h:97
internal::FloatingEqMatcher< double > NanSensitiveDoubleNear(double rhs, double max_abs_error)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3519
Matcher< T > MakeMatcher(const MatcherInterface< T > *impl)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:459
internal::UnorderedElementsAreArrayMatcher< typename ::std::iterator_traits< Iter >::value_type > UnorderedElementsAreArray(Iter first, Iter last)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3372
internal::AnyOfResult2< M1, M2 >::type AnyOf(M1 m1, M2 m2)
Definition dsd/test/gmock/include/gmock/gmock-generated-matchers.h:1096
Matcher< T > SafeMatcherCast(const M &polymorphic_matcher)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:640
bool Value(const T &value, M matcher)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3938
internal::RefMatcher< T & > Ref(T &x)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3492
internal::MatcherAsPredicate< M > Matches(M matcher)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3932
internal::PointeeMatcher< InnerMatcher > Pointee(const InnerMatcher &inner_matcher)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3555
PolymorphicMatcher< internal::StrEqualityMatcher< internal::string > > StrEq(const internal::string &str)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:3625
Definition dsd/test/gtest/include/gtest/internal/gtest-tuple.h:788
Definition dsd/test/gtest/include/gtest/internal/gtest-tuple.h:730
Definition dsd/test/gmock/include/gmock/internal/gmock-internal-utils.h:493
ResType(* StorageType)(ArgType)
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2143
static void CheckIsValid(ResType(*f)(ArgType))
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2145
ResType ResultType
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2142
static ResType Invoke(ResType(*f)(ArgType), T arg)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2150
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2130
Callable StorageType
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2132
Callable::result_type ResultType
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2131
static void CheckIsValid(Functor)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2134
static ResultType Invoke(Functor f, T arg)
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2136
Definition dsd/test/gmock/include/gmock/gmock-matchers.h:2365
bool operator()(const T &lhs, const U &rhs) const
Definition mbelib/test/gmock/include/gmock/gmock-matchers.h:2367
Definition dsd/test/gmock/include/gmock/internal/gmock-generated-internal-utils.h:69
Definition dsd/test/gmock/include/gmock/internal/gmock-internal-utils.h:63
Definition dsd/test/gmock/include/gmock/internal/gmock-internal-utils.h:480
static const bool value
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1613
Definition dsd/test/gtest/include/gtest/internal/gtest-port.h:1621