Is it possible to mock method that retrieves pointer (or reference) as argument and change pointed object?
I use turtle library - http://turtle.sourceforge.net/ -> A C++ mock object library for Boost. (I know it is not popular library but it can be similar in other libraries).
For example: I need to mock method as:
int f(int* x)
{
*x = new_value;
return 0;
}
Next SUT uses x value in code :(
In expactations I can set what my mock returns. But how about to modified argument?
How to do that?