OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 test.runner.reporter.compact; | 5 library test.runner.reporter.compact; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 import 'dart:isolate'; | 9 import 'dart:isolate'; |
10 | 10 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 if (state.result != Result.success) { | 110 if (state.result != Result.success) { |
111 _passed.remove(liveTest); | 111 _passed.remove(liveTest); |
112 _failed.add(liveTest); | 112 _failed.add(liveTest); |
113 } else if (liveTest.test.metadata.skip) { | 113 } else if (liveTest.test.metadata.skip) { |
114 _skipped.add(liveTest); | 114 _skipped.add(liveTest); |
115 } else { | 115 } else { |
116 _passed.add(liveTest); | 116 _passed.add(liveTest); |
117 } | 117 } |
118 | 118 |
119 // Always display the name of the oldest active test, unless testing is | |
120 // finished in which case display the last test to complete. | |
121 if (_active.isEmpty) { | |
122 _progressLine(_description(liveTest)); | |
123 } else { | |
124 _progressLine(_description(_active.first)); | |
125 } | |
126 | |
127 if (liveTest.test.metadata.skip && | 119 if (liveTest.test.metadata.skip && |
128 liveTest.test.metadata.skipReason != null) { | 120 liveTest.test.metadata.skipReason != null) { |
| 121 _progressLine(_description(liveTest)); |
129 print(''); | 122 print(''); |
130 print(indent('${_yellow}Skip: ${liveTest.test.metadata.skipReason}' | 123 print(indent('${_yellow}Skip: ${liveTest.test.metadata.skipReason}' |
131 '$_noColor')); | 124 '$_noColor')); |
132 } else { | 125 } else { |
| 126 // Always display the name of the oldest active test, unless testing |
| 127 // is finished in which case display the last test to complete. |
| 128 if (_active.isEmpty) { |
| 129 _progressLine(_description(liveTest)); |
| 130 } else { |
| 131 _progressLine(_description(_active.first)); |
| 132 } |
| 133 |
133 _printedNewline = false; | 134 _printedNewline = false; |
134 } | 135 } |
135 }); | 136 }); |
136 | 137 |
137 liveTest.onError.listen((error) { | 138 liveTest.onError.listen((error) { |
138 if (liveTest.state.status != Status.complete) return; | 139 if (liveTest.state.status != Status.complete) return; |
139 | 140 |
140 _progressLine(_description(liveTest)); | 141 _progressLine(_description(liveTest)); |
141 if (!_printedNewline) print(''); | 142 if (!_printedNewline) print(''); |
142 _printedNewline = true; | 143 _printedNewline = true; |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 name = "${liveTest.suite.path}: $name"; | 292 name = "${liveTest.suite.path}: $name"; |
292 } | 293 } |
293 | 294 |
294 if (_multiplePlatforms && liveTest.suite.platform != null) { | 295 if (_multiplePlatforms && liveTest.suite.platform != null) { |
295 name = "[${liveTest.suite.platform}] $name"; | 296 name = "[${liveTest.suite.platform}] $name"; |
296 } | 297 } |
297 | 298 |
298 return name; | 299 return name; |
299 } | 300 } |
300 } | 301 } |
OLD | NEW |