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

Side by Side Diff: tools/testing/dart/summary_report.dart

Issue 1859973002: Autoformat tools/testing/dart (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Format whole directory Created 4 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 unified diff | Download patch
« no previous file with comments | « tools/testing/dart/status_reporter.dart ('k') | tools/testing/dart/test_configurations.dart » ('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 (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library summary_report; 5 library summary_report;
6 6
7 import "status_file_parser.dart"; 7 import "status_file_parser.dart";
8 import "test_runner.dart"; 8 import "test_runner.dart";
9 9
10 final summaryReport = new SummaryReport(); 10 final summaryReport = new SummaryReport();
(...skipping 19 matching lines...) Expand all
30 30
31 final List<TestCase> _nonStandardTestCases = <TestCase>[]; 31 final List<TestCase> _nonStandardTestCases = <TestCase>[];
32 32
33 void add(TestCase testCase) { 33 void add(TestCase testCase) {
34 var expectations = testCase.expectedOutcomes; 34 var expectations = testCase.expectedOutcomes;
35 35
36 bool containsFail = expectations 36 bool containsFail = expectations
37 .any((expectation) => expectation.canBeOutcomeOf(Expectation.FAIL)); 37 .any((expectation) => expectation.canBeOutcomeOf(Expectation.FAIL));
38 bool containsPass = expectations.contains(Expectation.PASS); 38 bool containsPass = expectations.contains(Expectation.PASS);
39 bool containsSkip = expectations 39 bool containsSkip = expectations
40 .any((expectation) => expectation.canBeOutcomeOf(Expectation.SKIP)); 40 .any((expectation) => expectation.canBeOutcomeOf(Expectation.SKIP));
41 bool containsSkipByDesign = 41 bool containsSkipByDesign =
42 expectations.contains(Expectation.SKIP_BY_DESIGN); 42 expectations.contains(Expectation.SKIP_BY_DESIGN);
43 bool containsCrash = expectations.contains(Expectation.CRASH); 43 bool containsCrash = expectations.contains(Expectation.CRASH);
44 bool containsOK = expectations.contains(Expectation.OK); 44 bool containsOK = expectations.contains(Expectation.OK);
45 bool containsSlow = expectations.contains(Expectation.SLOW); 45 bool containsSlow = expectations.contains(Expectation.SLOW);
46 bool containsTimeout = expectations.contains(Expectation.TIMEOUT); 46 bool containsTimeout = expectations.contains(Expectation.TIMEOUT);
47 47
48 ++_total; 48 ++_total;
49 if (containsSkip) { 49 if (containsSkip) {
50 ++_skipped; 50 ++_skipped;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 } 94 }
95 } 95 }
96 96
97 void addCompileErrorSkipTest() { 97 void addCompileErrorSkipTest() {
98 _total++; 98 _total++;
99 _compileErrorSkip++; 99 _compileErrorSkip++;
100 } 100 }
101 101
102 Map<String, int> get values => { 102 Map<String, int> get values => {
103 'total': _total, 103 'total': _total,
104 'skippedOther': skippedOther, 104 'skippedOther': skippedOther,
105 'skippedByDesign': _skippedByDesign, 105 'skippedByDesign': _skippedByDesign,
106 'pass': _pass, 106 'pass': _pass,
107 'noCrash': _noCrash, 107 'noCrash': _noCrash,
108 'flakyCrash': _flakyCrash, 108 'flakyCrash': _flakyCrash,
109 'failOk': _failOk, 109 'failOk': _failOk,
110 'fail': _fail, 110 'fail': _fail,
111 'crash': _crash, 111 'crash': _crash,
112 'timeout': _timeout, 112 'timeout': _timeout,
113 'compileErrorSkip': _compileErrorSkip, 113 'compileErrorSkip': _compileErrorSkip,
114 'bogus': bogus 114 'bogus': bogus
115 }; 115 };
116 116
117 String get report => """Total: $_total tests 117 String get report => """Total: $_total tests
118 * $_skipped tests will be skipped ($_skippedByDesign skipped by design) 118 * $_skipped tests will be skipped ($_skippedByDesign skipped by design)
119 * $_noCrash tests are expected to be flaky but not crash 119 * $_noCrash tests are expected to be flaky but not crash
120 * $_flakyCrash tests are expected to flaky crash 120 * $_flakyCrash tests are expected to flaky crash
121 * $_pass tests are expected to pass 121 * $_pass tests are expected to pass
122 * $_failOk tests are expected to fail that we won't fix 122 * $_failOk tests are expected to fail that we won't fix
123 * $_fail tests are expected to fail that we should fix 123 * $_fail tests are expected to fail that we should fix
124 * $_crash tests are expected to crash that we should fix 124 * $_crash tests are expected to crash that we should fix
125 * $_timeout tests are allowed to timeout 125 * $_timeout tests are allowed to timeout
126 * $_compileErrorSkip tests are skipped on browsers due to compile-time error 126 * $_compileErrorSkip tests are skipped on browsers due to compile-time error
127 * $bogus could not be categorized or are in multiple categories 127 * $bogus could not be categorized or are in multiple categories
128 """; 128 """;
129 129
130 void printReport() { 130 void printReport() {
131 if (_total == 0) return; 131 if (_total == 0) return;
132 print(report); 132 print(report);
133 } 133 }
134 } 134 }
OLDNEW
« no previous file with comments | « tools/testing/dart/status_reporter.dart ('k') | tools/testing/dart/test_configurations.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698