34 #include "gtest/gtest-test-part.h" 41 #define GTEST_IMPLEMENTATION_ 1 42 #include "src/gtest-internal-inl.h" 43 #undef GTEST_IMPLEMENTATION_ 53 return stack_trace == NULL ? message :
60 << result.file_name() <<
":" << result.line_number() <<
": " 63 "Non-fatal failure") <<
":\n" 64 << result.message() << std::endl;
69 array_.push_back(result);
74 if (index < 0 || index >=
size()) {
75 printf(
"\nInvalid index (%d) into TestPartResultArray.\n", index);
84 return static_cast<int>(array_.size());
89 HasNewFatalFailureHelper::HasNewFatalFailureHelper()
90 : has_new_fatal_failure_(
false),
92 GetTestPartResultReporterForCurrentThread()) {
96 HasNewFatalFailureHelper::~HasNewFatalFailureHelper() {
101 void HasNewFatalFailureHelper::ReportTestPartResult(
103 if (result.fatally_failed())
104 has_new_fatal_failure_ =
true;
105 original_reporter_->ReportTestPartResult(result);
class UnitTestImpl * GetUnitTestImpl()
static std::string ExtractSummary(const char *message)
std::ostream & operator<<(std::ostream &os, const Message &sb)
TestPartResult(Type a_type, const char *a_file_name, int a_line_number, const char *a_message)
constexpr auto size(C const &c) -> decltype(c.size())
void SetTestPartResultReporterForCurrentThread(TestPartResultReporterInterface *reporter)
const TestPartResult & GetTestPartResult(int index) const
GTEST_API_ const char kStackTraceMarker[]
void Append(const TestPartResult &result)