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

Do we need create mocker object explicit? #15

Closed
gzc9047 opened this issue Aug 27, 2014 · 2 comments
Closed

Do we need create mocker object explicit? #15

gzc9047 opened this issue Aug 27, 2014 · 2 comments

Comments

@gzc9047
Copy link
Owner

gzc9047 commented Aug 27, 2014

Such as:
MOCK(func); // instead of CREATE_MOCKER(mocker, func);
EXPECT_CALL(MOCKER(func), MOCKER_FUNCTION(...)).Times(...);

@gzc9047
Copy link
Owner Author

gzc9047 commented Aug 27, 2014

Does MOCKER(func) is a good way to use insead of mocker name?
If you need write EXPECT_CALL many times it seems not friendly, you need write MOCKER(func) many time.
But if you just write EXPECT_CALL once, an anonymous object is better.

gzc9047 added a commit that referenced this issue Sep 15, 2014
#16 will override #11, try mock the same function will get the same
mocker object.
@gzc9047
Copy link
Owner Author

gzc9047 commented Sep 15, 2014

Done.

@gzc9047 gzc9047 closed this as completed Sep 15, 2014
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

No branches or pull requests

1 participant