| Index: pkg/analyzer/test/services/test_utils.dart
|
| diff --git a/pkg/analyzer/test/services/test_utils.dart b/pkg/analyzer/test/services/test_utils.dart
|
| index a0fb2d1ecc1841da1d89ed5fb845b9997bea7509..5773d4d757b326a103481c0db830ba64ab8dfade 100644
|
| --- a/pkg/analyzer/test/services/test_utils.dart
|
| +++ b/pkg/analyzer/test/services/test_utils.dart
|
| @@ -12,11 +12,9 @@ import 'package:analyzer/src/generated/scanner.dart';
|
| import 'package:analyzer/src/generated/source.dart';
|
| import 'package:unittest/unittest.dart';
|
|
|
| -
|
| /// Parse the given [source] as a statement and assert, if provided, that
|
| /// exactly a given set of [expectedErrorCodes] are encountered.
|
| Statement parseStatement(String source, [List<ErrorCode> expectedErrorCodes]) {
|
| -
|
| var listener = new _GatheringErrorListener();
|
| var reader = new CharSequenceReader(source);
|
| var scanner = new Scanner(null, reader, listener);
|
| @@ -34,7 +32,6 @@ Statement parseStatement(String source, [List<ErrorCode> expectedErrorCodes]) {
|
| return statement;
|
| }
|
|
|
| -
|
| Set<_MapEntry> _getMapEntrySet(Map m) {
|
| var result = new Set();
|
| m.forEach((k, v) {
|
| @@ -43,10 +40,8 @@ Set<_MapEntry> _getMapEntrySet(Map m) {
|
| return result;
|
| }
|
|
|
| -
|
| _unsupported() => throw new _UnsupportedOperationException();
|
|
|
| -
|
| /// Instances of the class [_GatheringErrorListener] implement an error listener
|
| /// that collects all of the errors passed to it for later examination.
|
| class _GatheringErrorListener implements AnalysisErrorListener {
|
| @@ -143,21 +138,17 @@ class _GatheringErrorListener implements AnalysisErrorListener {
|
| }
|
| }
|
|
|
| -
|
| void onError(AnalysisError error) {
|
| _errors.add(error);
|
| }
|
|
|
| -
|
| /// Sets the line information associated with the given source to the given
|
| /// information.
|
| void setLineInfo(Source source, List<int> lineStarts) {
|
| _lineInfoMap[source] = new LineInfo(lineStarts);
|
| }
|
| -
|
| }
|
|
|
| -
|
| class _MapEntry<K, V> {
|
| K _key;
|
| V _value;
|
| @@ -167,7 +158,6 @@ class _MapEntry<K, V> {
|
| }
|
|
|
| class _TestSource extends Source {
|
| -
|
| TimestampedData<String> get contents => _unsupported();
|
|
|
| AnalysisContext get context => _unsupported();
|
| @@ -197,7 +187,6 @@ class _TestSource extends Source {
|
| Uri resolveRelativeUri(Uri uri) => _unsupported();
|
| }
|
|
|
| -
|
| class _UnsupportedOperationException implements Exception {
|
| String toString() => 'UnsupportedOperationException';
|
| }
|
|
|