I am using gmock in my project and I meet a problem to set a custom reference variable for a mock function. Suppose I have a class as following:
class XXXClient {
public:
void QueryXXX(const Request&, Response&);
};
class XXXRunner {
public:
void DoSomething(XXXClient&);
};
客户等级为XXXRunner: DoSomething using XXXClient:QueryXXX, and I Want to mock XXXClient to test XXXRunner:DoSomething.
问题是,KeryXXX的第二个参数,即答复,不是回报价值,而是参考变量,我把一些数据填入第三十次的答复:QueryXXX。 我想为答复建立一个习俗数据,以核实30Runner的不同状况:DoSomething。
振克框架可以确定预期的回归价值,但我无法找到一种办法确定“回归变量”?
So How to do so?