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

Side by Side Diff: base/test/launcher/test_result.cc

Issue 2406243004: Introduce test output snippet byte limit (Closed)
Patch Set: 2.5 MB Created 4 years, 2 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/test/launcher/test_result.h" 5 #include "base/test/launcher/test_result.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
(...skipping 14 matching lines...) Expand all
25 case TEST_FAILURE: 25 case TEST_FAILURE:
26 return "FAILURE"; 26 return "FAILURE";
27 case TEST_FAILURE_ON_EXIT: 27 case TEST_FAILURE_ON_EXIT:
28 return "FAILURE_ON_EXIT"; 28 return "FAILURE_ON_EXIT";
29 case TEST_CRASH: 29 case TEST_CRASH:
30 return "CRASH"; 30 return "CRASH";
31 case TEST_TIMEOUT: 31 case TEST_TIMEOUT:
32 return "TIMEOUT"; 32 return "TIMEOUT";
33 case TEST_SKIPPED: 33 case TEST_SKIPPED:
34 return "SKIPPED"; 34 return "SKIPPED";
35 case TEST_EXCESSIVE_OUTPUT:
36 return "EXCESSIVE_OUTPUT";
35 // Rely on compiler warnings to ensure all possible values are handled. 37 // Rely on compiler warnings to ensure all possible values are handled.
36 } 38 }
37 39
38 NOTREACHED(); 40 NOTREACHED();
39 return std::string(); 41 return std::string();
40 } 42 }
41 43
42 std::string TestResult::GetTestName() const { 44 std::string TestResult::GetTestName() const {
43 size_t dot_pos = full_name.find('.'); 45 size_t dot_pos = full_name.find('.');
44 CHECK_NE(dot_pos, std::string::npos); 46 CHECK_NE(dot_pos, std::string::npos);
45 return full_name.substr(dot_pos + 1); 47 return full_name.substr(dot_pos + 1);
46 } 48 }
47 49
48 std::string TestResult::GetTestCaseName() const { 50 std::string TestResult::GetTestCaseName() const {
49 size_t dot_pos = full_name.find('.'); 51 size_t dot_pos = full_name.find('.');
50 CHECK_NE(dot_pos, std::string::npos); 52 CHECK_NE(dot_pos, std::string::npos);
51 return full_name.substr(0, dot_pos); 53 return full_name.substr(0, dot_pos);
52 } 54 }
53 55
54 } // namespace base 56 } // namespace base
OLDNEW
« 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