Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why Mock does not work? #54

Open
Darren-Guo opened this issue Feb 27, 2024 · 0 comments
Open

why Mock does not work? #54

Darren-Guo opened this issue Feb 27, 2024 · 0 comments

Comments

@Darren-Guo
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant