我想隔离writeMemory
,但由于以下错误而无法隔离:
../../Util/UnitTest++/../../UnitTests/KeeperDive_Test.h:66:57: 错误:预期表达式 mocks.ExpectCall(Skillmock, Skill::writeMemory).With(template (Skillmock));
class Skill
{
protected:
template <class T> void writeMemory(const char *key, T value)
{
PY_ERROR_TRY
{
skillMemory[key] = (T)value;
}
PY_ERROR_CATCH
}
};
TEST(run)
{
MockRepository mocks;
Skill *Skillmock = mocks.Mock<Skill>();
mocks.ExpectCall(Skillmock, Skill::writeMemory).With(template<class T>(Skillmock));
}