MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / ParseStringFlag

Function ParseStringFlag

tests/gtest/src/gtest.cc:6337–6347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6335// true. On failure, returns false without changing *value.
6336template <typename String>
6337static bool ParseStringFlag(const char* str, const char* flag, String* value) {
6338 // Gets the value of the flag as a string.
6339 const char* const value_str = ParseFlagValue(str, flag, false);
6340
6341 // Aborts if the parsing failed.
6342 if (value_str == nullptr) return false;
6343
6344 // Sets *value to the value of the flag.
6345 *value = value_str;
6346 return true;
6347}
6348
6349// Determines whether a string has a prefix that Google Test uses for its
6350// flags, i.e., starts with GTEST_FLAG_PREFIX_ or GTEST_FLAG_PREFIX_DASH_.

Callers 2

ParseGoogleTestFlagFunction · 0.70

Calls 1

ParseFlagValueFunction · 0.70

Tested by

no test coverage detected