aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/src/gmock-spec-builders.cc
diff options
context:
space:
mode:
authorGennadiy Civil <gennadiycivil@users.noreply.github.com>2017-09-01 00:05:22 -0400
committerGitHub <noreply@github.com>2017-09-01 00:05:22 -0400
commitee53b281ba16f5402e3a42003414a68d336fcd94 (patch)
tree2e629c5674eb80d2090aca0c27f8388d5b4801da /googlemock/src/gmock-spec-builders.cc
parentca76206f4268a009427afa96dfd792012db64583 (diff)
parent69e794ca75e6c07ad78a8f7467c267be9ac08921 (diff)
downloadgoogletest-ee53b281ba16f5402e3a42003414a68d336fcd94.tar.gz
googletest-ee53b281ba16f5402e3a42003414a68d336fcd94.tar.bz2
googletest-ee53b281ba16f5402e3a42003414a68d336fcd94.zip
Merge branch 'master' into user_logger_instead_of_printf
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