Implements the new matcher API.

This commit is contained in:
zhanyong.wan
2010-01-08 21:55:40 +00:00
parent 7f8eb725b5
commit 821133180c
6 changed files with 766 additions and 428 deletions

View File

@@ -1004,13 +1004,13 @@ class TypedExpectation : public ExpectationBase {
if (!TupleMatches(matchers_, args)) {
DescribeMatchFailureTupleTo(matchers_, args, os);
}
if (!extra_matcher_.Matches(args)) {
StringMatchResultListener listener;
if (!extra_matcher_.MatchAndExplain(args, &listener)) {
*os << " Expected args: ";
extra_matcher_.DescribeTo(os);
*os << "\n Actual: don't match";
internal::ExplainMatchResultAsNeededTo<const ArgumentTuple&>(
extra_matcher_, args, os);
internal::StreamInParensAsNeeded(listener.str(), os);
*os << "\n";
}
} else if (!AllPrerequisitesAreSatisfied()) {