vendredi 2 décembre 2016

How to call const std::function<>& parameter in mock expectation?

I have mocked function like:

virtual void MyClass::foo(const std::function<void()>& callback);

I want to set expectation for foo:

EXPECT_CALL(MyClassMock, foo(testing::_));

and then I want to call received callback when expectation is fulfilled.

How to do that using gmock?

Aucun commentaire:

Enregistrer un commentaire