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

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

Issue 2551023005: Prepare for decoupling analyzer ASTs from element model. (Closed)
Patch Set: Address review comments Created 4 years 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/src/dart/analysis/search_test.dart
diff --git a/pkg/analyzer/test/src/dart/analysis/search_test.dart b/pkg/analyzer/test/src/dart/analysis/search_test.dart
index e910b60ede1292f4225febc77b302bb8d6d58c13..af5256cd8fd27dcbcc4ccd4d22d86ed4d685bf52 100644
--- a/pkg/analyzer/test/src/dart/analysis/search_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/search_test.dart
@@ -5,6 +5,7 @@
import 'dart:async';
import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/standard_resolution_map.dart';
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/src/dart/analysis/driver.dart';
import 'package:analyzer/src/dart/analysis/search.dart';
@@ -177,7 +178,8 @@ class A {
ConstructorElement element = _findElementAtString('A() {}');
CompilationUnit otherUnit = (await driver.getResult(other)).unit;
- Element main = otherUnit.element.functions[0];
+ Element main =
+ resolutionMap.elementForCompilationUnit(otherUnit).functions[0];
var expected = [
new ExpectedResult(main, SearchResultKind.REFERENCE,
otherCode.indexOf('(); // in other'), 0,

Powered by Google App Engine
This is Rietveld 408576698