Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Unified Diff: dart/tools/testing/dart/test_progress.dart

Issue 11038064: Highlight test headings with -pcolor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/testing/dart/test_progress.dart
diff --git a/dart/tools/testing/dart/test_progress.dart b/dart/tools/testing/dart/test_progress.dart
index 1f1f55702609dbaac0b231f361c002e50877f91a..50192ce883aa8b15427383dcb8f042f7652a4b0b 100644
--- a/dart/tools/testing/dart/test_progress.dart
+++ b/dart/tools/testing/dart/test_progress.dart
@@ -115,10 +115,13 @@ class ProgressIndicator {
return '${_padTime(min)}:${_padTime(sec)}';
}
+ String _header(String header) => header;
+
void _printFailureOutput(TestCase test) {
List<String> output = new List<String>();
output.add('');
- output.add('FAILED: ${test.configurationString} ${test.displayName}');
+ output.add(_header('FAILED: ${test.configurationString}'
+ ' ${test.displayName}'));
StringBuffer expected = new StringBuffer();
expected.add('Expected: ');
for (var expectation in test.expectedOutcomes) {
@@ -276,6 +279,7 @@ class ColorProgressIndicator extends CompactIndicator {
ColorProgressIndicator(Date startTime, bool printTiming)
: super(startTime, printTiming);
+ static int BOLD = 1;
static int GREEN = 32;
static int RED = 31;
static int NONE = 0;
@@ -303,6 +307,12 @@ class ColorProgressIndicator extends CompactIndicator {
progressLine.addAll(']'.charCodes());
stdout.write(progressLine);
}
+
+ String _header(String header) {
+ var result = [];
+ addColorWrapped(result, header, BOLD);
+ return new String.fromCharCodes(result);
+ }
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698