I am new to gmock, so I want to know how can I stub simple C function called in a function under test for Unit Testing.
Example:
int func(int a) {
You can use the Cutie library to mock C function GoogleMock style. There's a full sample in the repo, but just a taste:
INSTALL_MOCK(close); CUTIE_EXPECT_CALL(fclose, _).WillOnce(Return(i));