summaryrefslogtreecommitdiffstats
path: root/googlemock/test/gmock-internal-utils_test.cc
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@google.com>2023-03-03 23:54:32 (GMT)
committerCopybara-Service <copybara-worker@google.com>2023-03-06 15:14:21 (GMT)
commit23142843f7c875907a6ed7985174a6e346e82c3d (patch)
tree27fada6ccf3be641ec3ec564887750cf6df98d70 /googlemock/test/gmock-internal-utils_test.cc
parentcead3d57c93ff8c4e5c1bbae57a5c0b0b0f6e168 (diff)
downloadgoogletest-23142843f7c875907a6ed7985174a6e346e82c3d.zip
googletest-23142843f7c875907a6ed7985174a6e346e82c3d.tar.gz
googletest-23142843f7c875907a6ed7985174a6e346e82c3d.tar.bz2
Use "#ifdef GTEST_OS_..." instead of "#if GTEST_OS_..."
This is compatible with compiling with "-Wundef" (#3267). PiperOrigin-RevId: 513943378 Change-Id: I47cf5fabbb77be061c4483a0adc54511af6b191c
Diffstat (limited to 'googlemock/test/gmock-internal-utils_test.cc')
-rw-r--r--googlemock/test/gmock-internal-utils_test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/googlemock/test/gmock-internal-utils_test.cc b/googlemock/test/gmock-internal-utils_test.cc
index 932bece..360d02a 100644
--- a/googlemock/test/gmock-internal-utils_test.cc
+++ b/googlemock/test/gmock-internal-utils_test.cc
@@ -56,7 +56,7 @@
#include "src/gtest-internal-inl.h"
#undef GTEST_IMPLEMENTATION_
-#if GTEST_OS_CYGWIN
+#ifdef GTEST_OS_CYGWIN
#include <sys/types.h> // For ssize_t. NOLINT
#endif
@@ -167,7 +167,7 @@ TEST(KindOfTest, Integer) {
EXPECT_EQ(kInteger, GMOCK_KIND_OF_(unsigned long long)); // NOLINT
EXPECT_EQ(kInteger, GMOCK_KIND_OF_(wchar_t)); // NOLINT
EXPECT_EQ(kInteger, GMOCK_KIND_OF_(size_t)); // NOLINT
-#if GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_CYGWIN
+#if defined(GTEST_OS_LINUX) || defined(GTEST_OS_MAC) || defined(GTEST_OS_CYGWIN)
// ssize_t is not defined on Windows and possibly some other OSes.
EXPECT_EQ(kInteger, GMOCK_KIND_OF_(ssize_t)); // NOLINT
#endif