Wrapping function in c
问题 I got task to write unit tests(using cunit and cmocka) for existing project(written in C), and a met following problem. When I wrap function that is defined in tested file, only original function is called. Additional, a can't change source of tested file. Everything I read didn't met the second condition, but on the other hard it is pretty hard to believe that unit test framework is not prepared for this kind of problem. So is it possible to wrap function call to function that is defined and