You cannot mock a variadic function directly in Google Mock.
The problem is that in general, there is no way for a mock object to
know how many arguments are passed to the variadic method, and what
the arguments' types are. Only the *author* of the base class knows
the protocol, and we cannot look into his head.
Therefore, to mock such a function, the *user* must teach the mock
object how to figure out the number of arguments and their types. One
way to do it is to provide overloaded versions of the function, as you
mentioned.
Ellipsis arguments are inherited from C and not really a C++ feature.
They are unsafe to use and don't work with arguments that have
constructors or destructors. Therefore we recommend to avoid them in
C++, as much as possible.
--
Zhanyong