Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Unified Diff: testing/gmock/include/gmock/gmock-spec-builders.h

Issue 1507002: Roll gtest r395:408 and gmock r278:282 to pick up ThreadLocal leak fix. (Closed)
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/gmock/include/gmock/gmock-matchers.h ('k') | testing/gmock/test/gmock-generated-matchers_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/gmock/include/gmock/gmock-spec-builders.h
diff --git a/testing/gmock/include/gmock/gmock-spec-builders.h b/testing/gmock/include/gmock/gmock-spec-builders.h
index 9b60f69204920f74344466239ef9dab13e97a985..74a095da7571c4b9a6a50e48dce971eef38b50f0 100644
--- a/testing/gmock/include/gmock/gmock-spec-builders.h
+++ b/testing/gmock/include/gmock/gmock-spec-builders.h
@@ -993,8 +993,8 @@ class TypedExpectation : public ExpectationBase {
// Describes the result of matching the arguments against this
// expectation to the given ostream.
// L >= g_gmock_mutex
- void DescribeMatchResultTo(const ArgumentTuple& args,
- ::std::ostream* os) const {
+ void ExplainMatchResultTo(const ArgumentTuple& args,
+ ::std::ostream* os) const {
g_gmock_mutex.AssertHeld();
if (is_retired()) {
@@ -1002,7 +1002,7 @@ class TypedExpectation : public ExpectationBase {
<< " Actual: it is retired\n";
} else if (!Matches(args)) {
if (!TupleMatches(matchers_, args)) {
- DescribeMatchFailureTupleTo(matchers_, args, os);
+ ExplainMatchFailureTupleTo(matchers_, args, os);
}
StringMatchResultListener listener;
if (!extra_matcher_.MatchAndExplain(args, &listener)) {
@@ -1010,7 +1010,7 @@ class TypedExpectation : public ExpectationBase {
extra_matcher_.DescribeTo(os);
*os << "\n Actual: don't match";
- internal::StreamInParensAsNeeded(listener.str(), os);
+ internal::PrintIfNotEmpty(listener.str(), os);
*os << "\n";
}
} else if (!AllPrerequisitesAreSatisfied()) {
@@ -1028,7 +1028,7 @@ class TypedExpectation : public ExpectationBase {
*os << " (end of pre-requisites)\n";
} else {
// This line is here just for completeness' sake. It will never
- // be executed as currently the DescribeMatchResultTo() function
+ // be executed as currently the ExplainMatchResultTo() function
// is called only when the mock function call does NOT match the
// expectation.
*os << "The call matches the expectation.\n";
@@ -1618,7 +1618,7 @@ class FunctionMockerBase : public UntypedFunctionMockerBase {
*why << "tried expectation #" << i << ": ";
}
*why << expectations_[i]->source_text() << "...\n";
- expectations_[i]->DescribeMatchResultTo(args, why);
+ expectations_[i]->ExplainMatchResultTo(args, why);
expectations_[i]->DescribeCallCountTo(why);
}
}
« no previous file with comments | « testing/gmock/include/gmock/gmock-matchers.h ('k') | testing/gmock/test/gmock-generated-matchers_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698