| 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 import 'dart:convert' show JSON; | 5 import 'dart:convert' show JSON; |
| 6 import 'dart:io'; | 6 import 'dart:io'; |
| 7 | 7 |
| 8 import 'configuration.dart'; | 8 import 'configuration.dart'; |
| 9 import 'expectation.dart'; | 9 import 'expectation.dart'; |
| 10 import 'path.dart'; | 10 import 'path.dart'; |
| 11 import 'summary_report.dart'; | 11 import 'summary_report.dart'; |
| 12 import 'test_runner.dart'; | 12 import 'test_runner.dart'; |
| 13 import 'test_suite.dart'; | |
| 14 import 'utils.dart'; | 13 import 'utils.dart'; |
| 15 | 14 |
| 16 /// Controls how message strings are processed before being displayed. | 15 /// Controls how message strings are processed before being displayed. |
| 17 class Formatter { | 16 class Formatter { |
| 18 /// Messages are left as-is. | 17 /// Messages are left as-is. |
| 19 static const normal = const Formatter._(); | 18 static const normal = const Formatter._(); |
| 20 | 19 |
| 21 /// Messages are wrapped in ANSI escape codes to color them for display on a | 20 /// Messages are wrapped in ANSI escape codes to color them for display on a |
| 22 /// terminal. | 21 /// terminal. |
| 23 static const color = const _ColorFormatter(); | 22 static const color = const _ColorFormatter(); |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 } | 666 } |
| 668 | 667 |
| 669 String _buildSummaryEnd(int failedTests) { | 668 String _buildSummaryEnd(int failedTests) { |
| 670 if (failedTests == 0) { | 669 if (failedTests == 0) { |
| 671 return '\n===\n=== All tests succeeded\n===\n'; | 670 return '\n===\n=== All tests succeeded\n===\n'; |
| 672 } else { | 671 } else { |
| 673 var pluralSuffix = failedTests != 1 ? 's' : ''; | 672 var pluralSuffix = failedTests != 1 ? 's' : ''; |
| 674 return '\n===\n=== ${failedTests} test$pluralSuffix failed\n===\n'; | 673 return '\n===\n=== ${failedTests} test$pluralSuffix failed\n===\n'; |
| 675 } | 674 } |
| 676 } | 675 } |
| OLD | NEW |