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

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

Issue 1151006: Update to current gtest/gmock. (Closed)
Patch Set: rebase 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-printers.h ('k') | testing/gmock/include/gmock/internal/gmock-port.h » ('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 9aa0a9eedda70cfade4254dd788ef073b9a06039..9b60f69204920f74344466239ef9dab13e97a985 100644
--- a/testing/gmock/include/gmock/gmock-spec-builders.h
+++ b/testing/gmock/include/gmock/gmock-spec-builders.h
@@ -112,7 +112,7 @@ template <typename F> class FunctionMockerBase;
// expectations when InSequence() is used, and thus affect which
// expectation gets picked. Therefore, we sequence all mock function
// calls to ensure the integrity of the mock objects' states.
-extern Mutex g_gmock_mutex;
+GTEST_DECLARE_STATIC_MUTEX_(g_gmock_mutex);
// Abstract base class of FunctionMockerBase. This is the
// type-agnostic part of the function mocker interface. Its pure
@@ -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()) {
« no previous file with comments | « testing/gmock/include/gmock/gmock-printers.h ('k') | testing/gmock/include/gmock/internal/gmock-port.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698