static bool helper(int a){
// do something here
return true;
}
class ProxyMock : public Proxy
{
public:
MOCK_METHOD1(functionA, bool(
int a
));
};
TEST(xxx, xxx){
ProxyMock mock;
int a;
EXPECT_CALL(mock, functionA(5)).WillOnce(testing::Invoke(helper(a));
}
when functionA of mock object is called with parameter(5), I would like to invoke a static global function helper which takes in the parameter I want.
When compiling I got errors:
'function' cannot be used as a function in the EXPECT_CALL line. What is wrong?