I would like to execute multiple instructions inside of a .Do().
Something like:
mocks.ExpectCallFunc(mockedFunc).Do(a++;someFunc();)
How can I make this happen?
You can either create a function to wrap what you need (bit of a overhead if its a function + a++), or you can create and pass a Lambda.
e.g. -
auto additionalFunc = [](<mockedFunc's arguments>) { a++; doFunc() ;};
mocks.ExpectCallFunc(mockedFunc).Do(additionalFunc)
Note that your lambda must return and accept same type arguments as the mockedFunc (even if it doesn't use them). So if the function you are mocking is bool mockedFunc(std::string&)
auto additionalFunc = [](std::string&) { a++; doFunc() ; return true;};
If you can't use lambda expressions (C++ < 11) then you should probably create a function packing the 2 options you need. Same guidelines apply (keep return value and arguments)