aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/src/gmock-spec-builders.cc
diff options
context:
space:
mode:
authorChe-Hsun Liu <chehsunliu@gmail.com>2017-08-31 19:02:12 +0800
committerGitHub <noreply@github.com>2017-08-31 19:02:12 +0800
commit3eaba9f07c5f81a8b83432e4ae389ee42337393f (patch)
tree948d6ccdcf5a59ec1310cf81817ea2042236bbb9 /googlemock/src/gmock-spec-builders.cc
parent24696c3958f0be6a87b52f07436417c53d0fef24 (diff)
parent16bfba08e2c63c33834a98d092cd6f1a3e547289 (diff)
downloadgoogletest-3eaba9f07c5f81a8b83432e4ae389ee42337393f.tar.gz
googletest-3eaba9f07c5f81a8b83432e4ae389ee42337393f.tar.bz2
googletest-3eaba9f07c5f81a8b83432e4ae389ee42337393f.zip
Merge branch 'master' into master
Diffstat (limited to 'googlemock/src/gmock-spec-builders.cc')
-rw-r--r--googlemock/src/gmock-spec-builders.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/googlemock/src/gmock-spec-builders.cc b/googlemock/src/gmock-spec-builders.cc
index 2fa1ee4b..0eaaee75 100644
--- a/googlemock/src/gmock-spec-builders.cc
+++ b/googlemock/src/gmock-spec-builders.cc
@@ -364,7 +364,7 @@ UntypedFunctionMockerBase::UntypedInvokeWith(const void* const untyped_args)
if (!need_to_report_uninteresting_call) {
// Perform the action without printing the call information.
- return this->UntypedPerformDefaultAction(untyped_args, "");
+ return this->UntypedPerformDefaultAction(untyped_args, "Function call: " + std::string(Name()));
}
// Warns about the uninteresting call.
@@ -508,6 +508,13 @@ bool UntypedFunctionMockerBase::VerifyAndClearExpectationsLocked()
return expectations_met;
}
+CallReaction intToCallReaction(int mock_behavior) {
+ if (mock_behavior >= kAllow && mock_behavior <= kFail) {
+ return static_cast<internal::CallReaction>(mock_behavior);
+ }
+ return kWarn;
+}
+
} // namespace internal
// Class Mock.
@@ -648,7 +655,8 @@ internal::CallReaction Mock::GetReactionOnUninterestingCalls(
GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
internal::MutexLock l(&internal::g_gmock_mutex);
return (g_uninteresting_call_reaction.count(mock_obj) == 0) ?
- internal::kDefault : g_uninteresting_call_reaction[mock_obj];
+ internal::intToCallReaction(GMOCK_FLAG(default_mock_behavior)) :
+ g_uninteresting_call_reaction[mock_obj];
}
// Tells Google Mock to ignore mock_obj when checking for leaked mock