MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / BoolFromGTestEnv

Function BoolFromGTestEnv

tests/external/gmock-1.7.0/gtest/src/gtest-port.cc:766–771  ·  view source on GitHub ↗

Reads and returns the Boolean environment variable corresponding to the given flag; if it's not set, returns default_value. The value is considered true iff it's not "0".

Source from the content-addressed store, hash-verified

764//
765// The value is considered true iff it's not "0".
766bool BoolFromGTestEnv(const char* flag, bool default_value) {
767 const std::string env_var = FlagToEnvVar(flag);
768 const char* const string_value = posix::GetEnv(env_var.c_str());
769 return string_value == NULL ?
770 default_value : strcmp(string_value, "0") != 0;
771}
772
773// Reads and returns a 32-bit integer stored in the environment
774// variable corresponding to the given flag; if it isn't set or

Callers 2

gtest.ccFile · 0.70

Calls 2

FlagToEnvVarFunction · 0.70
GetEnvFunction · 0.50

Tested by

no test coverage detected