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

No support for calling an overridden base-class method #99

Open
jonesmz opened this issue Jan 7, 2021 · 2 comments
Open

No support for calling an overridden base-class method #99

jonesmz opened this issue Jan 7, 2021 · 2 comments

Comments

@jonesmz
Copy link
Contributor

jonesmz commented Jan 7, 2021

When using turtle mock to mock objects that have virtual functions, frequently those virtual functions are intended to have their base implementation called.

Turtle mock has no mechanism to do that.

Ideally, the syntax for declaring a mock member function can be extended to signal that the base implementation should be called.

MOCK_CONST_METHOD(..., callBaseImpl);

@mat007
Copy link
Owner

mat007 commented Jan 7, 2021

@jonesmz
Copy link
Contributor Author

jonesmz commented Jan 8, 2021

Yes, that's what I'm doing now.

But when you have several hundred instances of a MOCK_EXPECT() on a function that needs to call the base class's function, it gets very tedious to have to use .calls() for each place.

I know that you're not actively working on this library anymore, but if someone does a drive-by contribution to add support for this that would be nice.

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

2 participants