38 #include "gmock/internal/gmock-internal-utils.h" 43 #include "gmock/gmock.h" 44 #include "gmock/internal/gmock-port.h" 45 #include "gtest/gtest.h" 56 char prev_char =
'\0';
57 for (
const char* p = id_name; *p !=
'\0'; prev_char = *(p++)) {
60 const bool starts_new_word =
IsUpper(*p) ||
65 if (starts_new_word && result !=
"")
100 static FailureReporterInterface*
const failure_reporter =
102 return failure_reporter;
133 int stack_frames_to_skip) {
145 std::cout <<
"\nGMOCK WARNING:";
148 if (message.empty() || message[0] !=
'\n') {
152 if (stack_frames_to_skip >= 0) {
155 const int actual_to_skip = 0;
159 const int actual_to_skip = stack_frames_to_skip + 1;
163 if (!message.empty() && *message.rbegin() !=
'\n') {
166 std::cout <<
"Stack trace:\n" 170 std::cout << ::std::flush;
GTEST_API_ std::string GetCurrentOsStackTraceExceptTop(UnitTest *unit_test, int skip_count)
GTEST_API_ string ConvertIdentifierNameToWords(const char *id_name)
const char kErrorVerbosity[]
GTEST_API_ FailureReporterInterface * GetFailureReporter()
const char kInfoVerbosity[]
GTEST_API_ void Log(LogSeverity severity, const string &message, int stack_frames_to_skip)
static GTEST_DEFINE_STATIC_MUTEX_(g_log_mutex)
GTEST_API_ bool LogIsVisible(LogSeverity severity)
virtual void ReportFailure(FailureType type, const char *file, int line, const string &message)
static UnitTest * GetInstance()