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

Unified Diff: pkg/analyzer/test/generated/test_support.dart

Issue 2317113005: Remove StringUtils from java_core. (Closed)
Patch Set: Created 4 years, 3 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 | « pkg/analyzer/lib/src/generated/java_core.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/test_support.dart
diff --git a/pkg/analyzer/test/generated/test_support.dart b/pkg/analyzer/test/generated/test_support.dart
index 93da8f01c679be24c592a6aa4e82b0f3d86ea19e..eef623fc20a632017987dcd15615cbe509cbed96 100644
--- a/pkg/analyzer/test/generated/test_support.dart
+++ b/pkg/analyzer/test/generated/test_support.dart
@@ -460,23 +460,17 @@ class GatheringErrorListener implements AnalysisErrorListener {
Source source = error.source;
LineInfo lineInfo = _lineInfoMap[source];
buffer.writeln();
+ String sourceName = source == null ? '' : source.shortName;
if (lineInfo == null) {
int offset = error.offset;
- StringUtils.printf(buffer, " %s %s (%d..%d)", [
- source == null ? "" : source.shortName,
- error.errorCode,
- offset,
- offset + error.length
- ]);
+ buffer.write(' $sourceName ${error.errorCode} '
+ '($offset..${offset + error.length})');
} else {
LineInfo_Location location = lineInfo.getLocation(error.offset);
- StringUtils.printf(buffer, " %s %s (%d, %d/%d)", [
- source == null ? "" : source.shortName,
- error.errorCode,
- location.lineNumber,
- location.columnNumber,
- error.length
- ]);
+ int lineNumber = location.lineNumber;
+ int columnNumber = location.columnNumber;
+ buffer.write(' $sourceName ${error.errorCode} '
+ '($lineNumber, $columnNumber/${error.length})');
}
}
buffer.writeln();
@@ -487,25 +481,17 @@ class GatheringErrorListener implements AnalysisErrorListener {
Source source = error.source;
LineInfo lineInfo = _lineInfoMap[source];
buffer.writeln();
+ String sourceName = source == null ? '' : source.shortName;
if (lineInfo == null) {
int offset = error.offset;
- StringUtils.printf(buffer, " %s %s (%d..%d): %s", [
- source == null ? "" : source.shortName,
- error.errorCode,
- offset,
- offset + error.length,
- error.message
- ]);
+ buffer.write(' $sourceName ${error.errorCode} '
+ '($offset..${offset + error.length}): ${error.message}');
} else {
LineInfo_Location location = lineInfo.getLocation(error.offset);
- StringUtils.printf(buffer, " %s %s (%d, %d/%d): %s", [
- source == null ? "" : source.shortName,
- error.errorCode,
- location.lineNumber,
- location.columnNumber,
- error.length,
- error.message
- ]);
+ int lineNumber = location.lineNumber;
+ int columnNumber = location.columnNumber;
+ buffer.write(' $sourceName ${error.errorCode} '
+ '($lineNumber, $columnNumber/${error.length}): ${error.message}');
}
}
fail(buffer.toString());
« no previous file with comments | « pkg/analyzer/lib/src/generated/java_core.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698