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

Unified Diff: pkg/analyzer/test/src/dart/analysis/index_test.dart

Issue 2521913004: Deoptimize Search - request a new resolved unit for local search. (Closed)
Patch Set: Created 4 years, 1 month 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/src/dart/analysis/base.dart ('k') | pkg/analyzer/test/src/dart/analysis/search_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/dart/analysis/index_test.dart
diff --git a/pkg/analyzer/test/src/dart/analysis/index_test.dart b/pkg/analyzer/test/src/dart/analysis/index_test.dart
index 8c544c72d7a8789bb03be97d7edffb596aad6771..04048636e3235c44ebea7f5b9cf1798b6aea1137 100644
--- a/pkg/analyzer/test/src/dart/analysis/index_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/index_test.dart
@@ -7,7 +7,6 @@ import 'dart:convert';
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/dart/element/visitor.dart';
import 'package:analyzer/src/dart/analysis/driver.dart';
import 'package:analyzer/src/dart/analysis/index.dart';
import 'package:analyzer/src/summary/format.dart';
@@ -23,28 +22,6 @@ main() {
});
}
-/**
- * Finds an [Element] with the given [name].
- */
-Element findChildElement(Element root, String name, [ElementKind kind]) {
- Element result = null;
- root.accept(new _ElementVisitorFunctionWrapper((Element element) {
- if (element.name != name) {
- return;
- }
- if (kind != null && element.kind != kind) {
- return;
- }
- result = element;
- }));
- return result;
-}
-
-/**
- * A function to be called for every [Element].
- */
-typedef void _ElementVisitorFunction(Element element);
-
class ExpectedLocation {
final CompilationUnitElement unitElement;
final int offset;
@@ -1210,20 +1187,6 @@ class _ElementIndexAssert {
}
}
-/**
- * Wraps an [_ElementVisitorFunction] into a [GeneralizingElementVisitor].
- */
-class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor {
- final _ElementVisitorFunction function;
-
- _ElementVisitorFunctionWrapper(this.function);
-
- visitElement(Element element) {
- function(element);
- super.visitElement(element);
- }
-}
-
class _NameIndexAssert {
final IndexTest test;
final String name;
« no previous file with comments | « pkg/analyzer/test/src/dart/analysis/base.dart ('k') | pkg/analyzer/test/src/dart/analysis/search_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698