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

Side by Side Diff: utils/testrunner/standard_test_runner.dart

Issue 11033042: Change imports etc to new syntax. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // dart2js is not handling 'part of' properly yet; when it does uncomment this.
Siggi Cherem (dart-lang) 2012/10/05 21:37:51 ditto
6 //part of test_controller;
7
5 /** Path to DRT executable. */ 8 /** Path to DRT executable. */
6 String drt; 9 String drt;
7 10
8 /** Whether to include elapsed time. */ 11 /** Whether to include elapsed time. */
9 bool includeTime; 12 bool includeTime;
10 13
11 /** Whether to regenerate layout test files. */ 14 /** Whether to regenerate layout test files. */
12 bool regenerate; 15 bool regenerate;
13 16
14 /** Whether to output test summary. */ 17 /** Whether to output test summary. */
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 groupName = t.description.substring(0, idx).replaceAll('###', ' '); 156 groupName = t.description.substring(0, idx).replaceAll('###', ' ');
154 if (!groups.containsKey(groupName)) { 157 if (!groups.containsKey(groupName)) {
155 groups[groupName] = ''; 158 groups[groupName] = '';
156 } 159 }
157 } 160 }
158 } 161 }
159 for (var g in groups.getKeys()) { 162 for (var g in groups.getKeys()) {
160 var msg = formatListMessage('$testfile ', '$g '); 163 var msg = formatListMessage('$testfile ', '$g ');
161 print('###$msg'); 164 print('###$msg');
162 } 165 }
166 if (notifyDone != null) {
Siggi Cherem (dart-lang) 2012/10/05 21:37:51 I don't see what's the relation of this part of th
167 notifyDone(0);
168 }
163 } 169 }
164 170
165 listTests() { 171 listTests() {
166 List tests = unittest.testCases; 172 List tests = unittest.testCases;
167 for (var t in tests) { 173 for (var t in tests) {
168 var groupName, testName = ''; 174 var groupName, testName = '';
169 var idx = t.description.lastIndexOf('###'); 175 var idx = t.description.lastIndexOf('###');
170 if (idx >= 0) { 176 if (idx >= 0) {
171 groupName = t.description.substring(0, idx).replaceAll('###', ' '); 177 groupName = t.description.substring(0, idx).replaceAll('###', ' ');
172 testName = t.description.substring(idx+3); 178 testName = t.description.substring(idx+3);
173 } else { 179 } else {
174 groupName = ''; 180 groupName = '';
175 testName = t.description; 181 testName = t.description;
176 } 182 }
177 var msg = formatListMessage('$testfile ', '$groupName ', '$testName '); 183 var msg = formatListMessage('$testfile ', '$groupName ', '$testName ');
178 print('###$msg'); 184 print('###$msg');
179 } 185 }
186 if (notifyDone != null) {
187 notifyDone(0);
188 }
180 } 189 }
181 190
182 // Support for running in isolates. 191 // Support for running in isolates.
183 192
184 class TestRunnerChildConfiguration extends unittest.Configuration { 193 class TestRunnerChildConfiguration extends unittest.Configuration {
185 get name => 'Test runner child configuration'; 194 get name => 'Test runner child configuration';
186 get autoStart => false; 195 get autoStart => false;
187 196
188 void onDone(int passed, int failed, int errors, 197 void onDone(int passed, int failed, int errors,
189 List<unittest.TestCase> results, String uncaughtError) { 198 List<unittest.TestCase> results, String uncaughtError) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 } 275 }
267 276
268 process(testMain, action) { 277 process(testMain, action) {
269 unittest.groupSep = '###'; 278 unittest.groupSep = '###';
270 unittest.configure(new TestRunnerConfiguration()); 279 unittest.configure(new TestRunnerConfiguration());
271 unittest.group('', testMain); 280 unittest.group('', testMain);
272 // Do any user-specified test filtering. 281 // Do any user-specified test filtering.
273 unittest.filterTests(filterTest); 282 unittest.filterTests(filterTest);
274 action(); 283 action();
275 } 284 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698