What steps will reproduce the problem?
I'm not sure how to mock C-style API calls.
E.g. I've a myprogram_api.h code snippet as below.
...
typedef enum _MYPROGRAMRET {
SUCCESS,
...,
...
} MYPROGRAMRET;
MYPROGRAMAPI_CALL(MYPROGRAMRET) MYPROGRAMAPI_isEnabledA(IN char* userName);
MYPROGRAMAPI_CALL(MYPROGRAMRET) MYPROGRAMAPI_isEnabledW(IN LPWSTR userName);
#ifdef _UNICODE
#define MYPROGRAMAPI_isEnabled MYPROGRAMAPI_isEnabledW
#else
#define MYPROGRAMAPI_isEnabled MYPROGRAMAPI_isEnabledA
#endif // !UNICODE
...
What version of the product are you using? On what operating system?
gmock-1.0.0, Windows XP, Visual Studio 2005 (msvc8).
Please provide any additional information below.
The external myprogram_api.h project will output a DLL. Is Gmock the way to
unit test without the myprogram_api.h project's DLL?
Original issue reported on code.google.com by shee...@gmail.com on 2 Feb 2010 at 4:29
Original issue reported on code.google.com by
shee...@gmail.com
on 2 Feb 2010 at 4:29