OLD | NEW |
---|---|
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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
158 | 158 |
159 // Otherwise truncate to return the trailing text, but attempt to start at | 159 // Otherwise truncate to return the trailing text, but attempt to start at |
160 // the beginning of a word. | 160 // the beginning of a word. |
161 var res = text.substring(text.length - maxLength + 4); | 161 var res = text.substring(text.length - maxLength + 4); |
162 var firstSpace = res.indexOf(' '); | 162 var firstSpace = res.indexOf(' '); |
163 if (firstSpace > 0) { | 163 if (firstSpace > 0) { |
164 res = res.substring(firstSpace); | 164 res = res.substring(firstSpace); |
165 } | 165 } |
166 return '...$res'; | 166 return '...$res'; |
167 } | 167 } |
168 | |
169 void notifyController(String msg) {} | |
gram
2013/01/11 18:48:49
I assume this is okay, although it is not related
Siggi Cherem (dart-lang)
2013/01/11 19:03:13
yeah - in a previous CL I made this a subclass of
| |
170 } | 168 } |
171 | 169 |
172 void useCompactVMConfiguration() { | 170 void useCompactVMConfiguration() { |
171 if (config != null) return; | |
173 configure(new CompactVMConfiguration()); | 172 configure(new CompactVMConfiguration()); |
174 } | 173 } |
OLD | NEW |