Valerio Provaggi
unread,Dec 14, 2010, 5:59:36 AM12/14/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google C++ Mocking Framework
Hi,
In my team we have a problem mocking an object. We have an interface
with a method overloaded, something like this:
class ITable {
public:
virtual void write(Record, Field, Value) = 0;
virtual void write(Record, Field, Position, Value)
= 0;
}
The mock has the two mock function definition witho MOCK_METHOD3 and
4. Usually we use to call the real object, like
ON_CALL(*this, write(_,_,_))
.WillByDefault(Invoke(mReal, &ITable::write));
Where mReal is a pointer to a concrete product object.
In the past when we had only a write with 3 all goes well, when we
introduced the 4 parameter version we had this compilation error:
"no matching function for call to Invoke <Unresolved overloaded
function type>"
Thank you very much,
Valerio