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

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

Issue 8537010: Enable frong testing components. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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
Index: tools/testing/dart/test_progress.dart
diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart
index feccb6393d62e54426ca41c0620dcda763837baa..8b944a7dea9466d137818d947dfdb575c4fc66d9 100644
--- a/tools/testing/dart/test_progress.dart
+++ b/tools/testing/dart/test_progress.dart
@@ -54,7 +54,14 @@ class ProgressIndicator {
}
void _printFailureOutput(TestCase test) {
- print('FAILED: ${test.displayName}');
+ print('\nFAILED: ${test.displayName}');
+ StringBuffer expected = new StringBuffer();
+ expected.add('Expected: ');
+ for (var expectation in test.expectedOutcomes) {
+ expected.add('$expectation ');
+ }
+ print(expected.toString());
+ print('Actual: ${test.output.result}');
if (!test.output.stdout.isEmpty()) {
print('\nstdout:');
test.output.stdout.forEach((s) => print(s));
@@ -82,10 +89,9 @@ class CompactProgressIndicator extends ProgressIndicator {
var passedPadded = _pad(_passedTests.toString(), 5);
var failedPadded = _pad(_failedTests.toString(), 5);
var progressLine =
- '[${_timeString()} | $percentPadded% | +$passedPadded | -$failedPadded]';
- // TODO(ager): Instead of using print we should write this to
- // stdout and use \r to reuse the same line.
- print(progressLine);
+ '\r[${_timeString()} | $percentPadded% | ' +
+ '+$passedPadded | -$failedPadded]';
+ stdout.write(progressLine.charCodes());
}
}

Powered by Google App Engine
This is Rietveld 408576698