Reads and returns the string environment variable corresponding to the given flag; if it's not set, returns default_value.
| 9006 | // Reads and returns the string environment variable corresponding to |
| 9007 | // the given flag; if it's not set, returns default_value. |
| 9008 | const 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 |
no test coverage detected