diff options
author | Tom Hughes <tomhughes@google.com> | 2023-03-04 00:01:13 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-03-06 15:15:44 (GMT) |
commit | dc10c3b5e55c1101e7759bdb7bf9790cebbf4ad2 (patch) | |
tree | 1b381b545e774039404cc7921b1500d765ebc2ae /googlemock/test | |
parent | 7b1ced0682af5fb10e4619457552cd11936c294a (diff) | |
download | googletest-dc10c3b5e55c1101e7759bdb7bf9790cebbf4ad2.zip googletest-dc10c3b5e55c1101e7759bdb7bf9790cebbf4ad2.tar.gz googletest-dc10c3b5e55c1101e7759bdb7bf9790cebbf4ad2.tar.bz2 |
Use "#ifdef" with public macros
This allows compilation with "-Wundef" (#3267).
PiperOrigin-RevId: 513944726
Change-Id: I1a3854bb2333d5dec6c0ff91ee1eddd9a766ab91
Diffstat (limited to 'googlemock/test')
-rw-r--r-- | googlemock/test/gmock-matchers-misc_test.cc | 2 | ||||
-rw-r--r-- | googlemock/test/gmock-spec-builders_test.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/googlemock/test/gmock-matchers-misc_test.cc b/googlemock/test/gmock-matchers-misc_test.cc index c1e4f35..0c7aa49 100644 --- a/googlemock/test/gmock-matchers-misc_test.cc +++ b/googlemock/test/gmock-matchers-misc_test.cc @@ -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. diff --git a/googlemock/test/gmock-spec-builders_test.cc b/googlemock/test/gmock-spec-builders_test.cc index ad56ead..d53196b 100644 --- a/googlemock/test/gmock-spec-builders_test.cc +++ b/googlemock/test/gmock-spec-builders_test.cc @@ -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 |