In the official version 3.1 of Hippomocks (https://www.assembla.com/spaces/hippomocks/wiki/Home) there used to be a MockRepository::ClassMock
that constructed mocked objects (contrary to MockRepository::InterfaceMock
that doesn't) which can be very useful when dealing with non-virtual class methods.
The current version's MockRepository::Mock
does what MockRepository::InterfaceMock
did in my opinion. Is there any possibility to construct mocked objects with the current version?
Rationale for my not taking the version 3.1: I need the also very useful ExpectCallFunc to test functions that don't belong to classes which was introduced later.
Rationale for not using placement new: Placement new would construct the object after being mocked by Hippomocks thus "resetting" the virtual function table previously altered by Hippomocks.