MCPcopy Create free account
hub / github.com/apache/singa / StringFromGTestEnv

Function StringFromGTestEnv

test/gtest/gtest-all.cc:9008–9012  ·  view source on GitHub ↗

Reads and returns the string environment variable corresponding to the given flag; if it's not set, returns default_value.

Source from the content-addressed store, hash-verified

9006// Reads and returns the string environment variable corresponding to
9007// the given flag; if it's not set, returns default_value.
9008const char* StringFromGTestEnv(const char* flag, const char* default_value) {
9009 const std::string env_var = FlagToEnvVar(flag);
9010 const char* const value = posix::GetEnv(env_var.c_str());
9011 return value == NULL ? default_value : value;
9012}
9013
9014} // namespace internal
9015} // namespace testing

Callers 1

gtest-all.ccFile · 0.85

Calls 2

FlagToEnvVarFunction · 0.85
GetEnvFunction · 0.85

Tested by

no test coverage detected