summaryrefslogtreecommitdiff
path: root/googletest
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@google.com>2023-02-08 08:29:22 -0800
committerCopybara-Service <copybara-worker@google.com>2023-02-08 08:29:54 -0800
commitb73f27fd164456fea9aba56163f5511355a03272 (patch)
tree0f64884ad205a57cf902d813dfd352fb48630aa1 /googletest
parent0570e2d930a185bbc375be70d9ad96836b955a4f (diff)
downloadgoogletest-git-b73f27fd164456fea9aba56163f5511355a03272.tar.gz
Fix _MSC_VER check
Use "#if defined(_MSC_VER)" instead of "#if _MSC_VER" to be consistent with other usages in googletest and to work with the "-Wundef" warning. PiperOrigin-RevId: 508087630 Change-Id: I29c16fd2fa51a9dfecd55e10362a020318318956
Diffstat (limited to 'googletest')
-rw-r--r--googletest/test/gtest_unittest.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc
index 2199073d..ecffa376 100644
--- a/googletest/test/gtest_unittest.cc
+++ b/googletest/test/gtest_unittest.cc
@@ -446,7 +446,7 @@ class FormatEpochTimeInMillisAsIso8601Test : public Test {
// tzset() distinguishes between the TZ variable being present and empty
// and not being present, so we have to consider the case of time_zone
// being NULL.
-#if _MSC_VER || GTEST_OS_WINDOWS_MINGW
+#if defined(_MSC_VER) || GTEST_OS_WINDOWS_MINGW
// ...Unless it's MSVC, whose standard library's _putenv doesn't
// distinguish between an empty and a missing variable.
const std::string env_var =