I am currently trying to write the unit test for some legacy code. In one of my function, it calls another function. According to the return value of the inner function, three branching conditions are present. The code is written in C++ and I am using cxxtest framework. How can I manipulate the return value of the inside function without going into the implementation of it so that I can pass through all the branching condition? I prefer to avoid dependencies between the functions. Is there any way to do this?
Aucun commentaire:
Enregistrer un commentaire