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

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

Issue 680913002: Remove JavaIterator and MapEntry (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « pkg/analyzer/test/generated/resolver_test.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 2f6bfa32299d2914b335a28f67c6619ef32692f0..a6bf2795405cd8fcffd7e79cb7a1901e36feb1d4 100644
--- a/pkg/analyzer/test/generated/test_support.dart
+++ b/pkg/analyzer/test/generated/test_support.dart
@@ -642,9 +642,7 @@ class GatheringErrorListener implements AnalysisErrorListener {
//
// Compare the expected and actual number of each type of error.
//
- for (MapEntry<ErrorCode, int> entry in getMapEntrySet(expectedCounts)) {
- ErrorCode code = entry.getKey();
- int expectedCount = entry.getValue();
+ expectedCounts.forEach((ErrorCode code, int expectedCount) {
int actualCount;
List<AnalysisError> list = errorsByCode.remove(code);
if (list == null) {
@@ -664,15 +662,12 @@ class GatheringErrorListener implements AnalysisErrorListener {
buffer.write(", found ");
buffer.write(actualCount);
}
- }
+ });
//
// Check that there are no more errors in the actual-errors map,
// otherwise record message.
//
- for (MapEntry<ErrorCode, List<AnalysisError>> entry in getMapEntrySet(
- errorsByCode)) {
- ErrorCode code = entry.getKey();
- List<AnalysisError> actualErrors = entry.getValue();
+ errorsByCode.forEach((ErrorCode code, List<AnalysisError> actualErrors) {
int actualCount = actualErrors.length;
if (buffer.length == 0) {
buffer.write("Expected ");
@@ -692,7 +687,7 @@ class GatheringErrorListener implements AnalysisErrorListener {
buffer.write(error.offset);
}
buffer.write(")");
- }
+ });
if (buffer.length > 0) {
JUnitTestCase.fail(buffer.toString());
}
« no previous file with comments | « pkg/analyzer/test/generated/resolver_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698