53 switch (fields.size()) {
59 std::string result =
"(" + fields[0];
60 for (
size_t i = 1; i < fields.size(); i++) {
75 char prev_char =
'\0';
76 for (
const char*
p = id_name; *
p !=
'\0'; prev_char = *(
p++)) {
79 const bool starts_new_word =
IsUpper(*
p) ||
84 if (starts_new_word && result !=
"")
97 virtual void ReportFailure(FailureType type,
const char* file,
int line,
98 const std::string& message) {
105 if (type == kFatal) {
119 static FailureReporterInterface*
const failure_reporter =
121 return failure_reporter;
133 }
else if (
GMOCK_FLAG(verbose) == kErrorVerbosity) {
151 int stack_frames_to_skip) {
163 std::cout <<
"\nGMOCK WARNING:";
166 if (message.empty() || message[0] !=
'\n') {
169 std::cout << message;
170 if (stack_frames_to_skip >= 0) {
173 const int actual_to_skip = 0;
177 const int actual_to_skip = stack_frames_to_skip + 1;
181 if (!message.empty() && *message.rbegin() !=
'\n') {
184 std::cout <<
"Stack trace:\n"
188 std::cout << ::std::flush;
196 "You are using DoDefault() inside a composite action like "
197 "DoAll() or WithArgs(). This is not supported for technical "
198 "reasons. Please instead spell out the default action, or "
199 "assign the default action to an Action variable and use "
200 "the variable in various places.");
static UnitTest * GetInstance()
virtual void ReportFailure(FailureType type, const char *file, int line, const std::string &message)
#define GTEST_DEFINE_STATIC_MUTEX_(mutex)
GTEST_API_ std::string ConvertIdentifierNameToWords(const char *id_name)
GTEST_API_ std::string JoinAsTuple(const Strings &fields)
::std::vector< ::std::string > Strings
GTEST_API_ bool LogIsVisible(LogSeverity severity)
void Assert(bool condition, const char *file, int line)
GTEST_API_ FailureReporterInterface * GetFailureReporter()
GTEST_API_ void IllegalDoDefault(const char *file, int line)
GTEST_API_ WithoutMatchers GetWithoutMatchers()
GTEST_API_ std::string GetCurrentOsStackTraceExceptTop(UnitTest *unit_test, int skip_count)