43std::string TestPartResult::ExtractSummary(
const char* message) {
45 return stack_trace == NULL ?
message :
46 std::string(message, stack_trace);
52 << result.file_name() <<
":" << result.line_number() <<
": "
55 "Non-fatal failure") <<
":\n"
56 << result.
message() << std::endl;
61 array_.push_back(result);
66 if (index < 0 || index >=
size()) {
67 printf(
"\nInvalid index (%d) into TestPartResultArray.\n", index);
76 return static_cast<int>(array_.size());
82 : has_new_fatal_failure_(false),
83 original_reporter_(GetUnitTestImpl()->
84 GetTestPartResultReporterForCurrentThread()) {
95 if (result.fatally_failed())
96 has_new_fatal_failure_ =
true;
const char * message() const
void Append(const TestPartResult &result)
const TestPartResult & GetTestPartResult(int index) const
const char * message() const
virtual void ReportTestPartResult(const TestPartResult &result)=0
virtual void ReportTestPartResult(const TestPartResult &result)
HasNewFatalFailureHelper()
virtual ~HasNewFatalFailureHelper()
void SetTestPartResultReporterForCurrentThread(TestPartResultReporterInterface *reporter)
class UnitTestImpl * GetUnitTestImpl()
GTEST_API_ const char kStackTraceMarker[]
std::ostream & operator<<(std::ostream &os, const Matcher< T > &matcher)