How to Configure GoogleMock in Visual Studio 2017 After Already Installing GoogleTest?

前端 未结 3 1122
不思量自难忘°
不思量自难忘° 2021-01-18 00:05

I installed the Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn package into my VS 2017 application solution. This was accomplished by adding a new GoogleTest pr

3条回答
  •  [愿得一人]
    2021-01-18 00:44

    I stumbled upon an answer to my own question. After installing gmock via NuGet, I tried keying #include "gmock/gmock.h" in my test project's .cpp just under the #include "gtest/gtest.h". That did not work. I looked in the "External Dependencies" folder for any reference to gmock but did not find one. I was stumped until I replaced #include "gmock/gmock.h" with #include "gtest/gmock.h". There were no errors generated at that point. I looks like I am on my way to doing some google type mocks.

提交回复
热议问题