32 #include "gmock/gmock.h" 41 "true iff Google Mock should report leaked mock objects " 45 "Controls how verbose Google Mock's output is." 47 " info - prints all messages.\n" 48 " warning - prints warnings and errors.\n" 49 " error - prints errors only.");
62 if (str == NULL || flag == NULL)
return NULL;
66 const size_t flag_len = flag_str.length();
67 if (strncmp(str, flag_str.c_str(), flag_len) != 0)
return NULL;
70 const char* flag_end = str + flag_len;
73 if (def_optional && (flag_end[0] ==
'\0')) {
80 if (flag_end[0] !=
'=')
return NULL;
97 if (value_str == NULL)
return false;
100 *value = !(*value_str ==
'0' || *value_str ==
'f' || *value_str ==
'F');
115 if (value_str == NULL)
return false;
126 template <
typename CharType>
131 if (*argc <= 0)
return;
133 for (
int i = 1; i != *argc; i++) {
135 const char*
const arg = arg_string.c_str();
145 for (
int j = i; j != *argc; j++) {
146 argv[j] = argv[j + 1];
GTEST_API_ void InitGoogleMock(int *argc, char **argv)
GMOCK_DEFINE_bool_(catch_leaked_mocks, true,"true iff Google Mock should report leaked mock objects ""as failures.")
std::string StreamableToString(const T &streamable)
static bool ParseGoogleMockBoolFlag(const char *str, const char *flag, bool *value)
const char kWarningVerbosity[]
void InitGoogleMockImpl(int *argc, CharType **argv)
GMOCK_DEFINE_string_(verbose, internal::kWarningVerbosity,"Controls how verbose Google Mock's output is."" Valid values:\n"" info - prints all messages.\n"" warning - prints warnings and errors.\n"" error - prints errors only.")
static const char * ParseGoogleMockFlagValue(const char *str, const char *flag, bool def_optional)
internal::NamedArg< char > arg(StringRef name, const T &arg)
void InitGoogleTest(int *argc, char **argv)
static bool ParseGoogleMockStringFlag(const char *str, const char *flag, std::string *value)