Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#3683 Added SetMockName function to distinguish between mock objects #4137

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jdfa
Copy link

@jdfa jdfa commented Jan 31, 2023

No description provided.

@google-cla
Copy link

google-cla bot commented Jan 31, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@jdfa jdfa closed this Jan 31, 2023
@jdfa jdfa reopened this Jan 31, 2023
@jdfa jdfa marked this pull request as draft January 31, 2023 19:13
@jdfa jdfa marked this pull request as ready for review January 31, 2023 19:14
@jdfa jdfa closed this Jan 31, 2023
@jdfa jdfa reopened this Jan 31, 2023
@jdfa
Copy link
Author

jdfa commented Feb 1, 2023

Is there a way to restart approval workflow manually?

Copy link

@krishnacx krishnacx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor spelling typos.

docs/gmock_cheat_sheet.md Outdated Show resolved Hide resolved
docs/gmock_cheat_sheet.md Outdated Show resolved Hide resolved
googlemock/include/gmock/gmock-spec-builders.h Outdated Show resolved Hide resolved
googlemock/include/gmock/gmock-spec-builders.h Outdated Show resolved Hide resolved
googlemock/src/gmock-spec-builders.cc Outdated Show resolved Hide resolved
googlemock/include/gmock/gmock-spec-builders.h Outdated Show resolved Hide resolved
googlemock/src/gmock-spec-builders.cc Outdated Show resolved Hide resolved
std::string Mock::GetMockName(const void* mock_obj)
GTEST_LOCK_EXCLUDED_(internal::g_gmock_mutex) {
internal::MutexLock l(&internal::g_gmock_mutex);
if (g_mock_object_registry.states().count(mock_obj) == 0) return "";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use !g_mock_object_registry.states().count(mock_obj)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer current one, it is more explicit as for me

@dinord dinord self-assigned this Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants