Skip to content

Commit

Permalink
Fix ABI checker with testing module (#427)
Browse files Browse the repository at this point in the history
* Protect autologfixture with preprocessor

Signed-off-by: Michael Carroll <[email protected]>

* Update testing/include/gz/common/testing/AutoLogFixture.hh

Signed-off-by: Michael Carroll <[email protected]>

Co-authored-by: Jenn Nguyen <[email protected]>

Signed-off-by: Michael Carroll <[email protected]>
Co-authored-by: Jenn Nguyen <[email protected]>
  • Loading branch information
mjcarroll and jennuine authored Aug 30, 2022
1 parent 68b5a7c commit aec75f5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion testing/include/gz/common/testing/AutoLogFixture.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
#ifndef GZ_COMMON_TESTING_AUTOLOGFIXTURE_HH_
#define GZ_COMMON_TESTING_AUTOLOGFIXTURE_HH_

#include <gtest/gtest.h>
/// Protect to guarantee that gtest is included before this header.
#ifdef GTEST_API_

#include <memory>
#include <string>
Expand Down Expand Up @@ -56,4 +57,8 @@ class AutoLogFixture : public ::testing::Test

#include <gz/common/testing/detail/AutoLogFixture.hh>

#else
#warning "AutoLogFixture needs <gtest/gtest.h> to be included in order to work"
#endif // GTEST_API_

#endif // GZ_COMMON_TESTING_AUTOLOGFIXTURE_HH_

0 comments on commit aec75f5

Please sign in to comment.