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()) { |