MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / GetEnv

Function GetEnv

tests/gtest/gtest.h:2353–2366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2351inline const char* StrError(int errnum) { return strerror(errnum); }
2352#endif
2353inline const char* GetEnv(const char* name) {
2354#if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE || GTEST_OS_WINDOWS_RT
2355 // We are on Windows CE, which has no environment variables.
2356 static_cast<void>(name); // To prevent 'unused argument' warning.
2357 return nullptr;
2358#elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9)
2359 // Environment variables which we programmatically clear will be set to the
2360 // empty string rather than unset (NULL). Handle that case.
2361 const char* const env = getenv(name);
2362 return (env != nullptr && env[0] != '\0') ? env : nullptr;
2363#else
2364 return getenv(name);
2365#endif
2366}
2367
2368GTEST_DISABLE_MSC_DEPRECATED_POP_()
2369

Callers 15

create_lambda_configMethod · 0.85
create_functionMethod · 0.85
GetDefaultFilterFunction · 0.85
ShouldUseColorFunction · 0.85
OnTestIterationStartMethod · 0.85
RunMethod · 0.85
Int32FromEnvOrDieFunction · 0.85
TempDirFunction · 0.85
BoolFromGTestEnvFunction · 0.85
Int32FromGTestEnvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected