33 #ifndef GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
34 #define GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
61 const char* a_file_name,
63 const char* a_message)
65 file_name_(a_file_name == NULL ?
"" : a_file_name),
66 line_number_(a_line_number),
67 summary_(ExtractSummary(a_message)),
77 return file_name_.empty() ? NULL : file_name_.c_str();
85 const char*
summary()
const {
return summary_.c_str(); }
88 const char*
message()
const {
return message_.c_str(); }
91 bool passed()
const {
return type_ == kSuccess; }
94 bool failed()
const {
return type_ != kSuccess; }
107 static std::string ExtractSummary(
const char* message);
120 std::ostream&
operator<<(std::ostream& os,
const TestPartResult& result);
140 std::vector<TestPartResult> array_;
169 bool has_new_fatal_failure_;
179 #endif // GTEST_INCLUDE_GTEST_GTEST_TEST_PART_H_
bool has_new_fatal_failure() const
Definition: gtest-test-part.h:167
bool fatally_failed() const
Definition: gtest-test-part.h:100
Definition: gtest-death-test.h:43
const char * summary() const
Definition: gtest-test-part.h:85
Definition: gtest-test-part.h:53
const char * message() const
Definition: gtest-test-part.h:88
::std::string string
Definition: gtest-port.h:872
bool failed() const
Definition: gtest-test-part.h:94
virtual ~TestPartResultReporterInterface()
Definition: gtest-test-part.h:148
#define GTEST_API_
Definition: gtest-port.h:768
TestPartResult(Type a_type, const char *a_file_name, int a_line_number, const char *a_message)
Definition: gtest-test-part.h:60
std::ostream & operator<<(std::ostream &os, const Message &sb)
Definition: gtest-message.h:232
Definition: gtest-test-part.h:52
int line_number() const
Definition: gtest-test-part.h:82
Type
Definition: gtest-test-part.h:51
Definition: gtest-test-part.h:47
const char * file_name() const
Definition: gtest-test-part.h:76
Definition: gtest-test-part.h:161
Type type() const
Definition: gtest-test-part.h:72
bool passed() const
Definition: gtest-test-part.h:91
virtual void ReportTestPartResult(const TestPartResult &result)=0
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)
Definition: gtest-port.h:726
Definition: gtest-test-part.h:146
bool nonfatally_failed() const
Definition: gtest-test-part.h:97
TestPartResultArray()
Definition: gtest-test-part.h:128
Definition: gtest-test-part.h:126