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

Side by Side Diff: pkg/unittest/lib/compact_vm_config.dart

Issue 12090093: Reapply "Rename mappedBy to map." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed bug in previous commit. Created 7 years, 10 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
« no previous file with comments | « pkg/serialization/test/serialization_test.dart ('k') | pkg/unittest/lib/src/config.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 /** 5 /**
6 * A test configuration that generates a compact 1-line progress bar. The bar is 6 * A test configuration that generates a compact 1-line progress bar. The bar is
7 * updated in-place before and after each test is executed. If all test pass, 7 * updated in-place before and after each test is executed. If all test pass,
8 * you should only see a couple lines in the terminal. If a test fails, the 8 * you should only see a couple lines in the terminal. If a test fails, the
9 * failure is shown and the progress bar continues to be updated below it. 9 * failure is shown and the progress bar continues to be updated below it.
10 */ 10 */
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 print(_indent(test.message)); 51 print(_indent(test.message));
52 } 52 }
53 53
54 if (test.stackTrace != null && test.stackTrace != '') { 54 if (test.stackTrace != null && test.stackTrace != '') {
55 print(_indent(test.stackTrace)); 55 print(_indent(test.stackTrace));
56 } 56 }
57 } 57 }
58 } 58 }
59 59
60 String _indent(String str) { 60 String _indent(String str) {
61 return str.split("\n").mappedBy((line) => " $line").join("\n"); 61 return str.split("\n").map((line) => " $line").join("\n");
62 } 62 }
63 63
64 void onSummary(int passed, int failed, int errors, List<TestCase> results, 64 void onSummary(int passed, int failed, int errors, List<TestCase> results,
65 String uncaughtError) { 65 String uncaughtError) {
66 var success = false; 66 var success = false;
67 if (passed == 0 && failed == 0 && errors == 0 && uncaughtError == null) { 67 if (passed == 0 && failed == 0 && errors == 0 && uncaughtError == null) {
68 print('\nNo tests ran.'); 68 print('\nNo tests ran.');
69 } else if (failed == 0 && errors == 0 && uncaughtError == null) { 69 } else if (failed == 0 && errors == 0 && uncaughtError == null) {
70 _progressLine(_start, _pass, _fail, 'All tests pass', _GREEN); 70 _progressLine(_start, _pass, _fail, 'All tests pass', _GREEN);
71 print('\nAll $passed tests passed.'); 71 print('\nAll $passed tests passed.');
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 res = res.substring(firstSpace); 164 res = res.substring(firstSpace);
165 } 165 }
166 return '...$res'; 166 return '...$res';
167 } 167 }
168 } 168 }
169 169
170 void useCompactVMConfiguration() { 170 void useCompactVMConfiguration() {
171 if (config != null) return; 171 if (config != null) return;
172 configure(new CompactVMConfiguration()); 172 configure(new CompactVMConfiguration());
173 } 173 }
OLDNEW
« no previous file with comments | « pkg/serialization/test/serialization_test.dart ('k') | pkg/unittest/lib/src/config.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698