Is there a macro in Google Mock to ensure compile time check of the signature of f()
by appending the override
keyword to the macro substitution:
struct I
{
virtual void f() = 0;
};
struct MockI
{
MOCK_METHOD0(f, void()); // this will define another function if f signature changes
// leading to weird runtime test failures
};
noexcept
, notoverride
, but the answer is the same. – Massif