You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using MATCHER_P*() to define custom matchers, often we have parameters
that themselves are matchers, e.g.
MATCHER_P(HasAddress, matcher, ...) { ... }
Here the description of the HasProperty(matcher) matcher depends on the
description of the matcher. We should provide a function template:
template <typename Arg, class MatcherType>
string DescribeMatcher(const MatcherType& m, bool negation);
such that the user can write:
MATCHER_P(HasAddress, matcher,
"has an address that " +
DescribeMatcher<remove_reference<arg_type>::type *>(matcher, negation)) { ... }
where arg_type is the type of the value being matched, as inferred by the
compiler.
For example, HasAddress(IsNotNull()) will have a description:
has an address that is not NULL
Original issue reported on code.google.com by w...@google.com on 28 Sep 2010 at 5:24
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
w...@google.com
on 28 Sep 2010 at 5:24The text was updated successfully, but these errors were encountered: