| 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.no_io_compact; | 5 library test.runner.reporter.no_io_compact; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:isolate'; | 8 import 'dart:isolate'; |
| 9 | 9 |
| 10 import '../../backend/live_test.dart'; | 10 import '../../backend/live_test.dart'; |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 print(line); | 191 print(line); |
| 192 })); | 192 })); |
| 193 } | 193 } |
| 194 | 194 |
| 195 /// A callback called when [liveTest]'s state becomes [state]. | 195 /// A callback called when [liveTest]'s state becomes [state]. |
| 196 void _onStateChange(LiveTest liveTest, State state) { | 196 void _onStateChange(LiveTest liveTest, State state) { |
| 197 if (state.status != Status.complete) return; | 197 if (state.status != Status.complete) return; |
| 198 | 198 |
| 199 if (liveTest.test.metadata.skip && | 199 if (liveTest.test.metadata.skip && |
| 200 liveTest.test.metadata.skipReason != null) { | 200 liveTest.test.metadata.skipReason != null) { |
| 201 _progressLine(_description(liveTest)); | |
| 202 print(indent('${_yellow}Skip: ${liveTest.test.metadata.skipReason}' | 201 print(indent('${_yellow}Skip: ${liveTest.test.metadata.skipReason}' |
| 203 '$_noColor')); | 202 '$_noColor')); |
| 204 } else if (_engine.active.isNotEmpty) { | 203 } else if (_engine.active.isNotEmpty) { |
| 205 // If any tests are running, display the name of the oldest active | 204 // If any tests are running, display the name of the oldest active |
| 206 // test. | 205 // test. |
| 207 _progressLine(_description(_engine.active.first)); | 206 _progressLine(_description(_engine.active.first)); |
| 208 } | 207 } |
| 209 } | 208 } |
| 210 | 209 |
| 211 /// A callback called when [liveTest] throws [error]. | 210 /// A callback called when [liveTest] throws [error]. |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 322 |
| 324 if (_printPlatform && liveTest.suite.platform != null) { | 323 if (_printPlatform && liveTest.suite.platform != null) { |
| 325 name = "[${liveTest.suite.platform.name}] $name"; | 324 name = "[${liveTest.suite.platform.name}] $name"; |
| 326 } | 325 } |
| 327 | 326 |
| 328 if (liveTest.suite is LoadSuite) name = "$_bold$_gray$name$_noColor"; | 327 if (liveTest.suite is LoadSuite) name = "$_bold$_gray$name$_noColor"; |
| 329 | 328 |
| 330 return name; | 329 return name; |
| 331 } | 330 } |
| 332 } | 331 } |
| OLD | NEW |