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

Cookbook advises unnecessary complication #2794

Open
ricab opened this issue Apr 3, 2020 · 1 comment
Open

Cookbook advises unnecessary complication #2794

ricab opened this issue Apr 3, 2020 · 1 comment
Assignees

Comments

@ricab
Copy link

@ricab ricab commented Apr 3, 2020

The mock cookbook advises adding a backdoor to delegate on a mock's parent. But the parent can be called directly:

  ON_CALL(foo, Concrete).WillByDefault([&foo](const char* str) {
    return foo.Foo::Concrete(str);
  });

Demo: http://coliru.stacked-crooked.com/a/0ace6ada2bb9cf63

@ricab
Copy link
Author

@ricab ricab commented Apr 3, 2020

A little example that I tried locally: https://stackoverflow.com/a/61013936/

@vslashg vslashg self-assigned this Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.