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

Unified Diff: pkg/scheduled_test/test/metatest.dart

Issue 12473003: Remove deprecated StringBuffer.add, addAll and addCharCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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
Index: pkg/scheduled_test/test/metatest.dart
diff --git a/pkg/scheduled_test/test/metatest.dart b/pkg/scheduled_test/test/metatest.dart
index 9850ffff41e4f5df44948a5f9ad7355a45ab35b5..fe6657897caa9d88c90d9d3a7188579941e61243 100644
--- a/pkg/scheduled_test/test/metatest.dart
+++ b/pkg/scheduled_test/test/metatest.dart
@@ -137,29 +137,29 @@ bool _hasError(Map results) {
String _summarizeTests(Map results) {
var buffer = new StringBuffer();
for (var t in results["results"]) {
- buffer.add("${t['result'].toUpperCase()}: ${t['description']}\n");
- if (t['message'] != '') buffer.add("${_indent(t['message'])}\n");
+ buffer.writeln("${t['result'].toUpperCase()}: ${t['description']}");
+ if (t['message'] != '') buffer.writeln("${_indent(t['message'])}");
if (t['stackTrace'] != null && t['stackTrace'] != '') {
- buffer.add("${_indent(t['stackTrace'])}\n");
+ buffer.writeln("${_indent(t['stackTrace'])}");
}
}
- buffer.add("\n");
+ buffer.writeln("");
var success = false;
if (results['passed'] == 0 && results['failed'] == 0 &&
results['errors'] == 0 && results['uncaughtError'] == null) {
- buffer.add('No tests found.');
+ buffer.write('No tests found.');
// This is considered a failure too.
} else if (results['failed'] == 0 && results['errors'] == 0 &&
results['uncaughtError'] == null) {
- buffer.add('All ${results['passed']} tests passed.');
+ buffer.write('All ${results['passed']} tests passed.');
success = true;
} else {
if (results['uncaughtError'] != null) {
- buffer.add('Top-level uncaught error: ${results['uncaughtError']}');
+ buffer.write('Top-level uncaught error: ${results['uncaughtError']}');
}
- buffer.add('${results['passed']} PASSED, ${results['failed']} FAILED, '
+ buffer.write('${results['passed']} PASSED, ${results['failed']} FAILED, '
'${results['errors']} ERRORS');
}
return prefixLines(buffer.toString());

Powered by Google App Engine
This is Rietveld 408576698