Hi -- I'm having a few issues getting google mock to work, so I created a POC test file in my current project, here:
https://github.com/biot023/improc/blob/master/test/poc/poc_test.cpp
This, if I have things aright, should mock out the class Poc1, and test the class Poc2's utilisation of it.
To test this, I have the Poc1 class setup to return the string "poc1 string", and setup the mocked version to return "mock poc1 string".
Unfortunately, when I run this test, the string "poc1 string" is returned, and the expectation that MocPoc1::get_str should be called fails.
If anyone could have a look over the file (it's small and self-contained) & tell me where I'm going wrong, I'd be really, really grateful.
Thanks,
Doug.