From 2d3b36d40a04a34edd2d00cdc6e30a20602bb847 Mon Sep 17 00:00:00 2001 From: Sergey Date: Thu, 2 Mar 2023 15:31:26 -0700 Subject: [PATCH] Environment variables are accessible in UWP/WinRT apps Environment variables, for example `GTEST_FILTER`, `GTEST_OUTPUT` can be set before getting WinRT app run. GoogleTest can read environment variables and use them. It's easier than setting and passing command line parameters to WinRT app. --- googletest/include/gtest/internal/gtest-port.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 0160fadc..eb78992f 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -2169,8 +2169,8 @@ inline const char* StrError(int errnum) { return strerror(errnum); } inline const char* GetEnv(const char* name) { #if defined(GTEST_OS_WINDOWS_MOBILE) || defined(GTEST_OS_WINDOWS_PHONE) || \ - defined(GTEST_OS_WINDOWS_RT) || defined(GTEST_OS_ESP8266) || \ - defined(GTEST_OS_XTENSA) || defined(GTEST_OS_QURT) + defined(GTEST_OS_ESP8266) || defined(GTEST_OS_XTENSA) || \ + defined(GTEST_OS_QURT) // We are on an embedded platform, which has no environment variables. static_cast(name); // To prevent 'unused argument' warning. return nullptr;