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

Unified Diff: pkg/analyzer/test/services/test_utils.dart

Issue 975453004: Reformat (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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/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';
}
« no previous file with comments | « pkg/analyzer/test/services/formatter_test.dart ('k') | pkg/analyzer/test/source/package_map_provider_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698