Open git45016683 opened 2 years ago
You can take a look at this: https://github.com/sinojelly/mockcpp/blob/master/tests/ut/TestNonvirtualMethodMocker.h
Because nonvirtual member function is not interface, maybe mutable, tests depend on it is harmful. So there is no convenient interface to mock nonvirtual member function, just a demo there.
Thanks for your response and help. i try to do like the link, but got error " error: ‘CApiHookFunctor’ was not declared in this scope (const void*)CApiHookFunctor<FAKE_BOOST_TYPEOF(Cfoobar::fooWORDref_static)>::hook, ^ " and the same error with 'ThunkCodeProvider'
i search the mockcpp resposity, but didn't found key word 'ThunkCodeProvider' and 'CApiHookFunctor' except this file"https://github.com/sinojelly/mockcpp/blob/master/tests/ut/TestNonvirtualMethodMocker.h"
May I ignore something important? or what's wrong happed?
Does mockcpp support virtual functions? It is not pure virtual functions. I try to mock virtual function in class, but return value is not what I expected thank you for your reply.
Does mockcpp support virtual functions? It is not pure virtual functions. I try to mock virtual function in class, but return value is not what I expected thank you for your reply.
I think it does.
i try to mock a nonvirtual member function, but it show me error like this:
i want to know below information: