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

Unified Diff: base/test/launcher/test_result.cc

Issue 2606153003: Report failed expect/assert to test launcher summary output. (Closed)
Patch Set: Always provide unencoded summary. Created 3 years, 12 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/test/launcher/test_result.h ('k') | base/test/launcher/test_results_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/launcher/test_result.cc
diff --git a/base/test/launcher/test_result.cc b/base/test/launcher/test_result.cc
index 39e20e7f01fca47687b3cd10b3c5abf82afa11b0..ce4776ab2aab493d324dc9365c1b62ad1141cef0 100644
--- a/base/test/launcher/test_result.cc
+++ b/base/test/launcher/test_result.cc
@@ -10,12 +10,53 @@
namespace base {
+TestResultPart::TestResultPart() = default;
+TestResultPart::~TestResultPart() = default;
+
+TestResultPart::TestResultPart(const TestResultPart& other) = default;
+TestResultPart::TestResultPart(TestResultPart&& other) = default;
+TestResultPart& TestResultPart::operator=(const TestResultPart& other) =
+ default;
+TestResultPart& TestResultPart::operator=(TestResultPart&& other) = default;
+
+// static
+bool TestResultPart::TypeFromString(const std::string& str, Type* type) {
+ if (str == "success")
+ *type = kSuccess;
+ else if (str == "failure")
+ *type = kNonFatalFailure;
+ else if (str == "fatal_failure")
+ *type = kFatalFailure;
+ else
+ return false;
+ return true;
+}
+
+std::string TestResultPart::TypeAsString() const {
+ switch (type) {
+ case kSuccess:
+ return "success";
+ case kNonFatalFailure:
+ return "failure";
+ case kFatalFailure:
+ return "fatal_failure";
+ default:
+ NOTREACHED();
+ }
+ return "unknown";
+}
+
TestResult::TestResult() : status(TEST_UNKNOWN) {
}
TestResult::~TestResult() {
}
+TestResult::TestResult(const TestResult& other) = default;
+TestResult::TestResult(TestResult&& other) = default;
+TestResult& TestResult::operator=(const TestResult& other) = default;
+TestResult& TestResult::operator=(TestResult&& other) = default;
+
std::string TestResult::StatusAsString() const {
switch (status) {
case TEST_UNKNOWN:
« no previous file with comments | « base/test/launcher/test_result.h ('k') | base/test/launcher/test_results_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698