Announcement

Collapse
No announcement yet.

How to use GoogleTest properly

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to use GoogleTest properly

    I see that GoogleTest library has been included in the latest engine version (it's in ..\UE_4.24\Engine\Source\ThirdParty\GoogleTest). That's great because I don't have to make a separate module to integrate myself!
    I created a test file in an empty C++ Unreal project and then tried to write a simple test in it, but it doesn't work. So in this cpp test file, I'm including the library in the Engine's ThirdParty folder like this:
    Code:
    #include "GoogleTest/include/gmock/gmock.h"
    #include "GoogleTest/include/gtest/gtest.h"
    Intellisense does not complain about it, but it then complains about any other gtest related macro or declaration that I try to use in the test file.
    More specifically, when I then try to build, I have a lot of errors complaining that it cannot find the headers included in the library, for example
    Code:
    Cannot open include file: 'gmock/gmock-actions.h': No such file or directory
    Now, that file is there and it exists.
    What do I need to change or add or include in order to see the other headers?
    Thanks!
Working...
X