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

Function HasGoogleTestFlagPrefix

test/common/gtest/gtest.cpp:6683–6690  ·  view source on GitHub ↗

Determines whether a string has a prefix that Google Test uses for its flags, i.e., starts with GTEST_FLAG_PREFIX_ or GTEST_FLAG_PREFIX_DASH_. If Google Test detects that a command line flag has its prefix but is not recognized, it will print its help message. Flags starting with GTEST_INTERNAL_PREFIX_ followed by "internal_" are considered Google Test internal flags and do not trigger the help me

Source from the content-addressed store, hash-verified

6681// GTEST_INTERNAL_PREFIX_ followed by "internal_" are considered Google Test
6682// internal flags and do not trigger the help message.
6683static bool HasGoogleTestFlagPrefix(const char* str) {
6684 return (SkipPrefix("--", &str) ||
6685 SkipPrefix("-", &str) ||
6686 SkipPrefix("/", &str)) &&
6687 !SkipPrefix(GTEST_FLAG_PREFIX_ "internal_", &str) &&
6688 (SkipPrefix(GTEST_FLAG_PREFIX_, &str) ||
6689 SkipPrefix(GTEST_FLAG_PREFIX_DASH_, &str));
6690}
6691
6692// Prints a string containing code-encoded text. The following escape
6693// sequences can be used in the string to control the text color:

Callers 1

Calls 1

SkipPrefixFunction · 0.85

Tested by

no test coverage detected