diff options
author | Jonathan Wendeborn <jonathan.wendeborn@bruker.com> | 2018-10-16 06:19:02 (GMT) |
---|---|---|
committer | Jonathan Wendeborn <jonathan.wendeborn@bruker.com> | 2018-10-16 06:19:02 (GMT) |
commit | 6bbf911a8dc0c42ad05135f26a07f4893eb83916 (patch) | |
tree | 99aa9e0347860eb1c7a6df4b37cac4333b9c5657 /googlemock | |
parent | 67a240a107888c0d3baba528f05820dcc8ac737f (diff) | |
download | googletest-6bbf911a8dc0c42ad05135f26a07f4893eb83916.zip googletest-6bbf911a8dc0c42ad05135f26a07f4893eb83916.tar.gz googletest-6bbf911a8dc0c42ad05135f26a07f4893eb83916.tar.bz2 |
Don't fully qualify enum member
Diffstat (limited to 'googlemock')
-rw-r--r-- | googlemock/src/gmock-spec-builders.cc | 10 | ||||
-rw-r--r-- | googlemock/test/gmock-nice-strict_test.cc | 3 |
2 files changed, 5 insertions, 8 deletions
diff --git a/googlemock/src/gmock-spec-builders.cc b/googlemock/src/gmock-spec-builders.cc index 0813a97..408623d 100644 --- a/googlemock/src/gmock-spec-builders.cc +++ b/googlemock/src/gmock-spec-builders.cc @@ -710,11 +710,9 @@ bool Mock::VerifyAndClearExpectationsLocked(void* mock_obj) namespace { // checks whether the specified mock_obj has a registered call reaction bool HasCallReaction(void* mock_obj, internal::CallReaction reaction) { - using internal::CallReaction; - const auto found = g_uninteresting_call_reaction.find(mock_obj); if (found == g_uninteresting_call_reaction.cend()) { - return internal::CallReaction::kDefault == reaction; + return internal::kDefault == reaction; } return found->second == reaction; } @@ -723,17 +721,17 @@ bool HasCallReaction(void* mock_obj, internal::CallReaction reaction) { bool Mock::IsNaggy(void* mock_obj) GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) { internal::MutexLock l(&internal::g_gmock_mutex); - return HasCallReaction(mock_obj, internal::CallReaction::kWarn); + return HasCallReaction(mock_obj, internal::kWarn); } bool Mock::IsNice(void* mock_obj) GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) { internal::MutexLock l(&internal::g_gmock_mutex); - return HasCallReaction(mock_obj, internal::CallReaction::kAllow); + return HasCallReaction(mock_obj, internal::kAllow); } bool Mock::IsStrict(void* mock_obj) GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) { internal::MutexLock l(&internal::g_gmock_mutex); - return HasCallReaction(mock_obj, internal::CallReaction::kFail); + return HasCallReaction(mock_obj, internal::kFail); } // Registers a mock object and a mock method it owns. diff --git a/googlemock/test/gmock-nice-strict_test.cc b/googlemock/test/gmock-nice-strict_test.cc index 78f3b51..38daee0 100644 --- a/googlemock/test/gmock-nice-strict_test.cc +++ b/googlemock/test/gmock-nice-strict_test.cc @@ -161,9 +161,8 @@ TEST(RawMockTest, InfoForUninterestingCall) { } TEST(RawMockTest, IsNaggy_IsNice_IsStrict) { - using internal::CallReaction; MockFoo raw_foo; - ASSERT_EQ(CallReaction::kDefault, CallReaction::kWarn) << "precondition"; + ASSERT_EQ(internal::kDefault, internal::kWarn) << "precondition"; EXPECT_TRUE (Mock::IsNaggy(&raw_foo)); EXPECT_FALSE(Mock::IsNice(&raw_foo)); EXPECT_FALSE(Mock::IsStrict(&raw_foo)); |