Click here to Skip to main content
15,878,945 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I need to mock objects and change method behavior in c++.
The problem is that Gmock requires my methods to be virtual in order to inherit from them and change the behavior but I am not able to change my methods to virtual.

What I have tried:

I have tried Typemock Isolator++, it can access any kind of method but unfortunately it is commercial .
Other mocking frameworks that I checked also requires each method to be virtual just like Gmock.
Thanks in advance
Posted
Updated 14-May-19 23:28pm

1 solution

 
Share this answer
 
Comments
IlanGreen 16-May-19 3:25am    
My biggest requirement is the ability to mock without changing my code, I havent seen this parameter in the comparison of Wikipedia, thats why I posted it here
Richard MacCutchan 16-May-19 4:02am    
Fine, but that is still not a technical question (see Code Project Quick Answers FAQ[^]).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900