Adding a flag option to change the default mock type

This commit is contained in:
Alyssa Wilk
2017-08-10 09:41:09 -04:00
parent b322d1d91d
commit 6e1970e237
6 changed files with 102 additions and 3 deletions

View File

@@ -648,7 +648,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];
static_cast<internal::CallReaction>(GMOCK_FLAG(default_mock_behavior)) :
g_uninteresting_call_reaction[mock_obj];
}
// Tells Google Mock to ignore mock_obj when checking for leaked mock