Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3728)

Unified Diff: base/test/gtest_xml_unittest_result_printer.h

Issue 2638763004: Report CHECK/DCHECK to test launcher summary output. (Closed)
Patch Set: Add test for assert handlers nesting. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/strings/string_piece_forward.h ('k') | base/test/gtest_xml_unittest_result_printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/gtest_xml_unittest_result_printer.h
diff --git a/base/test/gtest_xml_unittest_result_printer.h b/base/test/gtest_xml_unittest_result_printer.h
index c7fb88f3708695eaa3c0c1a92d99f726cd7ea864..cce5e88023a045f0de48486ee35de995a980d3df 100644
--- a/base/test/gtest_xml_unittest_result_printer.h
+++ b/base/test/gtest_xml_unittest_result_printer.h
@@ -25,6 +25,12 @@ class XmlUnitTestResultPrinter : public testing::EmptyTestEventListener {
// Must be called before adding as a listener. Returns true on success.
bool Initialize(const FilePath& output_file_path) WARN_UNUSED_RESULT;
+ // CHECK/DCHECK failed. Print file/line and message to the xml.
+ void OnAssert(const char* file,
+ int line,
+ const std::string& summary,
+ const std::string& message);
+
private:
// testing::EmptyTestEventListener:
void OnTestCaseStart(const testing::TestCase& test_case) override;
@@ -32,7 +38,11 @@ class XmlUnitTestResultPrinter : public testing::EmptyTestEventListener {
void OnTestEnd(const testing::TestInfo& test_info) override;
void OnTestCaseEnd(const testing::TestCase& test_case) override;
- void WriteTestPartResult(const testing::TestPartResult& test_part_result);
+ void WriteTestPartResult(const char* file,
+ int line,
+ testing::TestPartResult::Type type,
+ const std::string& summary,
+ const std::string& message);
FILE* output_file_;
« no previous file with comments | « base/strings/string_piece_forward.h ('k') | base/test/gtest_xml_unittest_result_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698