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

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

Issue 243263004: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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') | pkg/analyzer/test/services/formatter_test.dart » ('j') | 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 435d3ce8ade7b4f12c3de128af7290ccbc57508c..f3c93bed7b5831e13a56cca2118d53838ad2a969 100644
--- a/pkg/analyzer/test/generated/test_support.dart
+++ b/pkg/analyzer/test/generated/test_support.dart
@@ -10,7 +10,6 @@ library engine.test_support;
import 'package:analyzer/src/generated/java_core.dart';
import 'package:analyzer/src/generated/java_junit.dart';
import 'package:analyzer/src/generated/java_engine.dart';
-import 'package:analyzer/src/generated/utilities_collection.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/generated/error.dart';
import 'package:analyzer/src/generated/scanner.dart';
@@ -143,9 +142,9 @@ class GatheringErrorListener implements AnalysisErrorListener {
//
// Compare the expected and actual number of each type of error.
//
- for (MapIterator<ErrorCode, int> iter = SingleMapIterator.forMap(expectedCounts); iter.moveNext();) {
- ErrorCode code = iter.key;
- int expectedCount = iter.value;
+ for (MapEntry<ErrorCode, int> entry in getMapEntrySet(expectedCounts)) {
+ ErrorCode code = entry.getKey();
+ int expectedCount = entry.getValue();
int actualCount;
List<AnalysisError> list = errorsByCode.remove(code);
if (list == null) {
@@ -169,9 +168,9 @@ class GatheringErrorListener implements AnalysisErrorListener {
//
// Check that there are no more errors in the actual-errors map, otherwise, record message.
//
- for (MapIterator<ErrorCode, List<AnalysisError>> iter = SingleMapIterator.forMap(errorsByCode); iter.moveNext();) {
- ErrorCode code = iter.key;
- List<AnalysisError> actualErrors = iter.value;
+ for (MapEntry<ErrorCode, List<AnalysisError>> entry in getMapEntrySet(errorsByCode)) {
+ ErrorCode code = entry.getKey();
+ List<AnalysisError> actualErrors = entry.getValue();
int actualCount = actualErrors.length;
if (builder.length == 0) {
builder.append("Expected ");
@@ -821,6 +820,8 @@ main() {
}
class TestSource implements Source {
+ String _name;
+ TestSource([this._name = '/test.dart']);
int get hashCode => 0;
bool operator ==(Object object) {
return object is TestSource;
@@ -832,10 +833,10 @@ class TestSource implements Source {
throw new UnsupportedOperationException();
}
String get fullName {
- throw new UnsupportedOperationException();
+ return _name;
}
String get shortName {
- throw new UnsupportedOperationException();
+ return _name;
}
String get encoding {
throw new UnsupportedOperationException();
« no previous file with comments | « pkg/analyzer/test/generated/resolver_test.dart ('k') | pkg/analyzer/test/services/formatter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698