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

ExpectCallDestructor fails with multiple inheritance using virtual destructor of second base class #108

Open
michielveldkamp opened this issue Sep 5, 2019 · 0 comments

Comments

@michielveldkamp
Copy link

michielveldkamp commented Sep 5, 2019

Suppose we mock a class that implements two interfaces, and our code uses the second interface, then we cannot expect deletion with ExpectCallDestructor:

terminate called after throwing an instance of 'HippoMocks::NotImplementedException'
what(): Function called without expectation!
Expectations set:
test.cpp(48) Expectation for IBar::Bar() on the mock at 0x0xab5c20 was satisfied.
test.cpp(49) Expectation for destructor() on the mock at 0x0xab5c20 was not satisfied

This was tested on the latest version on both master branch and cpp11 branch using g++ 6.2.0 (with -g3 -O0, and -std=c++11 for the cpp11 branch).

test.cpp.txt

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