| 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 unittest.runner.reporter.no_io_compact; | 5 library test.runner.reporter.no_io_compact; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import '../../backend/live_test.dart'; | 9 import '../../backend/live_test.dart'; |
| 10 import '../../backend/state.dart'; | 10 import '../../backend/state.dart'; |
| 11 import '../../backend/suite.dart'; | 11 import '../../backend/suite.dart'; |
| 12 import '../../utils.dart'; | 12 import '../../utils.dart'; |
| 13 import '../engine.dart'; | 13 import '../engine.dart'; |
| 14 | 14 |
| 15 /// The maximum console line length. | 15 /// The maximum console line length. |
| 16 /// | 16 /// |
| 17 /// Lines longer than this will be cropped. | 17 /// Lines longer than this will be cropped. |
| 18 const _lineLength = 100; | 18 const _lineLength = 100; |
| 19 | 19 |
| 20 // TODO(nweiz): Get rid of this when issue 6943 is fixed. | 20 // TODO(nweiz): Get rid of this when issue 6943 is fixed. |
| 21 /// A reporter that doesn't import `dart:io`, even transitively. | 21 /// A reporter that doesn't import `dart:io`, even transitively. |
| 22 /// | 22 /// |
| 23 /// This is used in place of [CompactReporter] by `lib/unittest.dart`, which | 23 /// This is used in place of [CompactReporter] by `lib/test.dart`, which |
| 24 /// can't transitively import `dart:io` but still needs access to a runner so | 24 /// can't transitively import `dart:io` but still needs access to a runner so |
| 25 /// that test files can be run directly. | 25 /// that test files can be run directly. |
| 26 class NoIoCompactReporter { | 26 class NoIoCompactReporter { |
| 27 /// The terminal escape for green text, or the empty string if this is Windows | 27 /// The terminal escape for green text, or the empty string if this is Windows |
| 28 /// or not outputting to a terminal. | 28 /// or not outputting to a terminal. |
| 29 final String _green; | 29 final String _green; |
| 30 | 30 |
| 31 /// The terminal escape for red text, or the empty string if this is Windows | 31 /// The terminal escape for red text, or the empty string if this is Windows |
| 32 /// or not outputting to a terminal. | 32 /// or not outputting to a terminal. |
| 33 final String _red; | 33 final String _red; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 name = "${liveTest.suite.path}: $name"; | 200 name = "${liveTest.suite.path}: $name"; |
| 201 } | 201 } |
| 202 | 202 |
| 203 if (_multiplePlatforms && liveTest.suite.platform != null) { | 203 if (_multiplePlatforms && liveTest.suite.platform != null) { |
| 204 name = "[$liveTest.suite.platform] $name"; | 204 name = "[$liveTest.suite.platform] $name"; |
| 205 } | 205 } |
| 206 | 206 |
| 207 return name; | 207 return name; |
| 208 } | 208 } |
| 209 } | 209 } |
| OLD | NEW |