Skip to content

Commit

Permalink
Make it possible to cleanly #include <folly/portability/GTest.h>
Browse files Browse the repository at this point in the history
Summary:
Prior to this change, attempting to:
```
#include <folly/portability/GTest.h>
```
would result in a lint error:
```
~/fbsource$ arc lint -e extra

>>> Lint for xplat/arfx/engine/plugins/impl/gltf/tests/system/sender/ModifiedSenderTest.cpp:

   Advice  (CLANGTIDY) facebook-unused-include-check
    seemingly used include folly/portability/GTest.h only serves as an
    umbrella to other headers; you may want to include those directly instead;
    info/bugs: https://fburl.com/include

               5 #include <xplat/arfx/engine/plugins/impl/gltf/model/Mesh.hpp>
               6 #include <xplat/arfx/engine/plugins/impl/gltf/model/Node.hpp>
               7
    >>>        8 #include <folly/portability/GTest.h>
               9
              10 namespace arfx::engine::runtime::gltf {
              11
```

This is a problem because the portability wrapper is needed to keep xplat tests working correctly on Citadel/windows.

Reviewed By: francoiscoulombe

Differential Revision: D60969223

fbshipit-source-id: 4d250151bc2b0e948b3ec743a44367c2027f5af0
  • Loading branch information
ben-- authored and facebook-github-bot committed Aug 9, 2024
1 parent 2f7582d commit 5c229c6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions folly/portability/GTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@
FOLLY_PUSH_WARNING
FOLLY_MSVC_DISABLE_WARNING(4251)
FOLLY_MSVC_DISABLE_WARNING(4275)
// IWYU pragma: begin_exports
#include <gtest/gtest.h>
// IWYU pragma: end_exports
FOLLY_POP_WARNING

0 comments on commit 5c229c6

Please sign in to comment.