summaryrefslogtreecommitdiff
path: root/googlemock
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@google.com>2023-03-03 16:01:13 -0800
committerCopybara-Service <copybara-worker@google.com>2023-03-06 07:15:44 -0800
commitdc10c3b5e55c1101e7759bdb7bf9790cebbf4ad2 (patch)
tree1b381b545e774039404cc7921b1500d765ebc2ae /googlemock
parent7b1ced0682af5fb10e4619457552cd11936c294a (diff)
downloadgoogletest-git-dc10c3b5e55c1101e7759bdb7bf9790cebbf4ad2.tar.gz
Use "#ifdef" with public macros
This allows compilation with "-Wundef" (#3267). PiperOrigin-RevId: 513944726 Change-Id: I1a3854bb2333d5dec6c0ff91ee1eddd9a766ab91
Diffstat (limited to 'googlemock')
-rw-r--r--googlemock/test/gmock-matchers-misc_test.cc2
-rw-r--r--googlemock/test/gmock-spec-builders_test.cc2
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 c1e4f352..0c7aa499 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 ad56ead0..d53196b3 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