52 switch (fields.size()) {
58 std::string result =
"(" + fields[0];
59 for (
size_t i = 1;
i < fields.size();
i++) {
74 char prev_char =
'\0';
75 for (
const char*
p = id_name; *
p !=
'\0'; prev_char = *(
p++)) {
78 const bool starts_new_word =
IsUpper(*
p) ||
83 if (starts_new_word && result !=
"")
97 const std::string& message)
override {
99 TestPartResult::kFatalFailure :
100 TestPartResult::kNonFatalFailure,
120 return failure_reporter;
150 int stack_frames_to_skip) {
159 std::cout <<
"\nGMOCK WARNING:";
162 if (message.empty() || message[0] !=
'\n') {
165 std::cout << message;
166 if (stack_frames_to_skip >= 0) {
169 const int actual_to_skip = 0;
173 const int actual_to_skip = stack_frames_to_skip + 1;
177 if (!message.empty() && *message.rbegin() !=
'\n') {
180 std::cout <<
"Stack trace:\n"
184 std::cout << ::std::flush;
192 "You are using DoDefault() inside a composite action like "
193 "DoAll() or WithArgs(). This is not supported for technical "
194 "reasons. Please instead spell out the default action, or "
195 "assign the default action to an Action variable and use "
196 "the variable in various places.");
GTEST_API_ std::string GetCurrentOsStackTraceExceptTop(UnitTest *unit_test, int skip_count)
GTEST_API_ void IllegalDoDefault(const char *file, int line)
GTEST_API_ FailureReporterInterface * GetFailureReporter()
::std::vector< ::std::string > Strings
const char kInfoVerbosity[]
GTEST_API_ std::string ConvertIdentifierNameToWords(const char *id_name)
void ReportFailure(FailureType type, const char *file, int line, const std::string &message) override
GTEST_API_ std::string JoinAsTuple(const Strings &fields)
static GTEST_DEFINE_STATIC_MUTEX_(g_log_mutex)
GTEST_API_ bool LogIsVisible(LogSeverity severity)
void Assert(bool condition, const char *file, int line, const std::string &msg)
static UnitTest * GetInstance()
const char kErrorVerbosity[]
GTEST_API_ WithoutMatchers GetWithoutMatchers()
GTEST_API_ void Log(LogSeverity severity, const std::string &message, int stack_frames_to_skip)