Can a mock class inherit from another mock class in googlemock?
问题 Can a mock class inherit from another mock class in googlemock? If yes, then please help me in understanding why isn't this working. class IA { public: virtual int test1(int a) = 0; }; class IB : public IA { public: virtual float test2(float b) = 0; }; class MockA : public IA { public: MOCK_METHOD1(test1, int (int a)); }; class MockB : public MockA, public IB { public: MOCK_METHOD1(test2, float (float b)); }; I get a cannot instantiate abstract class compiler error for MockB but not for MockA