Use MOCK_CONST_*
Simply call base constructor with custom params
C++ allows redefining access level on subclasses, so mocks should have everything as PUBLIC
class Loler
{
private:
virtual void lol();
}
class LolerMock
{
public:
MOCK_METHOD0(lol, void());
}Simply define overload params in mock type
class Loler
{
private:
virtual void lol();
virtual void lol(int kek);
}
class LolerMock
{
public:
MOCK_METHOD0(lol, void());
MOCK_METHOD0(lol, void(int kek));
}Append _T to the MOCK_ macro
template<typename T>
class X
{
public:
virtual void hey();
}
template<typename T>
class XMock
{
public:
MOCK_METHOD0_T(hey, void());
}Displays warning when any method not specified as EXPECT_CALL is called
Displays no warnings when some method not specified as EXPECT_CALL is called
Doesn't support nesting
Throws error when some method not specified as EXPECT_CALL is called
Doesn't support nesting