Make sure we copy and use the default mock destructor from the default virtual function table.
It seems it sets the default VTable up by default to call unmockedDtor(), but then makes a new VTable for the specific object but doesn't copy it across.
Seems to only be an issue on windows
A general work around is:
Fake(Dtor(mock));
// or When(Dtor(mock)).Do([](auto){} );
Coverage remained the same at 99.925% when pulling fa2cd3da13fe8c0b3d3e9e04ee5b66a5fb8ac090 on iress:OSS-7-fix-virtual-destructor-windows into 78ca536e6b32f11e2883d474719a447915e40005 on eranpeer:master.
Make sure we copy and use the default mock destructor from the default virtual function table.
It seems it sets the default VTable up by default to call
unmockedDtor()
, but then makes a new VTable for the specific object but doesn't copy it across.Seems to only be an issue on windows
A general work around is:
Another one for shared_ptr is this
Issue here: https://github.com/eranpeer/FakeIt/issues/288