Use "#ifdef" with public macros

This allows compilation with "-Wundef" (#3267).

PiperOrigin-RevId: 513944726
Change-Id: I1a3854bb2333d5dec6c0ff91ee1eddd9a766ab91
This commit is contained in:
Tom Hughes
2023-03-03 16:01:13 -08:00
committed by Copybara-Service
parent 7b1ced0682
commit dc10c3b5e5
17 changed files with 50 additions and 50 deletions

View File

@@ -200,7 +200,7 @@ TEST(IsTrueTest, IsTrueIsFalse) {
EXPECT_THAT(nonnull_unique, Not(IsFalse()));
}
#if GTEST_HAS_TYPED_TEST
#ifdef GTEST_HAS_TYPED_TEST
// Tests ContainerEq with different container types, and
// different element types.

View File

@@ -1088,7 +1088,7 @@ TEST(UnexpectedCallTest, UnsatisfiedPrerequisites) {
// Verifies that the failure message contains the two unsatisfied
// pre-requisites but not the satisfied one.
#if GTEST_USES_POSIX_RE
#ifdef GTEST_USES_POSIX_RE
EXPECT_THAT(r.message(),
ContainsRegex(
// POSIX RE doesn't understand the (?s) prefix, but has no