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.
This commit is contained in:
parent
50e07d1c92
commit
2d3b36d40a
@ -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<void>(name); // To prevent 'unused argument' warning.
|
||||
return nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user