DEV Community

Deniz Babat
Deniz Babat

Posted on

Answer: How to Mock Member Objects in C++

I am in a similar situation to you - introducing unit tests to a legacy C++ project. To do so I have used a lot of preprocessor directives along with Google Test and Google Mock. Particularly, if I was facing to your example, I would do as follows:

#if

Top comments (0)