sinojelly / mockcpp

Two C/C++ testing tools, mockcpp and testngpp.
Apache License 2.0
66 stars 39 forks source link

why Mock does not work? #54

Open Darren-Guo opened 7 months ago

Darren-Guo commented 7 months ago

after i mock a c++ class function, my program still go into the function i mocked. but, in the same folder, same CMakeLists.txt, another test_cpp file could mock successful. my project folder like this: a.cpp { b.func(); } b.cpp main.cpp CMakeLists.txt my test folder : test_a.cpp test_b.cpp test_main.cpp i want to use b.cpp's function in a.cpp, and i mock b.func in a.cpp for test a.func.