MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / FlagToEnvVar

Function FlagToEnvVar

rtpose_wrapper/src/gtest/gtest-all.cpp:8451–8461  ·  view source on GitHub ↗

Returns the name of the environment variable corresponding to the given flag. For example, FlagToEnvVar("foo") will return "GTEST_FOO" in the open-source version.

Source from the content-addressed store, hash-verified

8449// given flag. For example, FlagToEnvVar("foo") will return
8450// "GTEST_FOO" in the open-source version.
8451static String FlagToEnvVar(const char* flag) {
8452 const String full_flag =
8453 (Message() << GTEST_FLAG_PREFIX_ << flag).GetString();
8454
8455 Message env_var;
8456 for (size_t i = 0; i != full_flag.length(); i++) {
8457 env_var << ToUpper(full_flag.c_str()[i]);
8458 }
8459
8460 return env_var.GetString();
8461}
8462
8463// Parses 'str' for a 32-bit signed integer. If successful, writes
8464// the result to *value and returns true; otherwise leaves *value

Callers 3

BoolFromGTestEnvFunction · 0.85
Int32FromGTestEnvFunction · 0.85
StringFromGTestEnvFunction · 0.85

Calls 2

ToUpperFunction · 0.85
MessageFunction · 0.70

Tested by

no test coverage detected