Mike Long gave a good example of how to work around the problem on
StackOverflow using an interface.
Could it be at all possible for Google Mock framework to to have a
feature where when creating MockB, it would automatically create a
subclass of B (e.g. Btag) and with an empty constructor (it's a mock
after all) and have MockB inherit from it?
This would simplify the use of Google Mock in these cases, which in
fact may be quite frequent if you practice dependency injection.
I understand how this might go against C++ syntax, but there are some
macro geniuses out there, so it's worth a shot asking.
On Apr 21, 10:46 am, Jonathan <
jonathan.li...@gmail.com> wrote:
> I've asked the following question here:
http://stackoverflow.com/questions/5726580/mocking-c-classes-with-dep...