You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
InSequence has no effect on Windows if gtest and gmock are linked as shared libraries (DLL). The same test works as expected if run on Linux.
Test code:
@vgaraschuk Could you try with only linking gmock (and gmock_main, eventually) and leave out the gtest* libraries in your link command?
gmock should include gtest statically, I believe, and using both gmock and gtest dynamically is reported (suspected) to have unexpected behavior. See e.g. this issue.
Looks like even the *_main libraries contains all necessary code (see here so even reducing further might be the way to go).
Not sure how main() in the dll is supposed to work. I'd use the gmock.dll and write the main() myself, calling the necessary initialisation code and RUN_ALL_TESTS().
InSequence has no effect on Windows if gtest and gmock are linked as shared libraries (DLL). The same test works as expected if run on Linux.
Test code:
CMakeLists.txt:
The test passes without an error even though the methods were called in reverse order.
The text was updated successfully, but these errors were encountered: