MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / StringFromGTestEnv

Function StringFromGTestEnv

test/common/gtest/gtest.cpp:9834–9838  ·  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

9832// Reads and returns the string environment variable corresponding to
9833// the given flag; if it's not set, returns default_value.
9834const char* StringFromGTestEnv(const char* flag, const char* default_value) {
9835 const std::string env_var = FlagToEnvVar(flag);
9836 const char* const value = posix::GetEnv(env_var.c_str());
9837 return value == NULL ? default_value : value;
9838}
9839
9840} // namespace internal
9841} // namespace testing

Callers 1

gtest.cppFile · 0.85

Calls 2

FlagToEnvVarFunction · 0.85
GetEnvFunction · 0.85

Tested by

no test coverage detected