| Index: pkg/analyzer/test/src/context/context_test.dart
|
| diff --git a/pkg/analyzer/test/src/context/context_test.dart b/pkg/analyzer/test/src/context/context_test.dart
|
| index b9d77b17075cc9e10ed1b9f9d713737fdcc09051..44f386d2c0abb8775bb86a4bb7d47c09c1eb55a0 100644
|
| --- a/pkg/analyzer/test/src/context/context_test.dart
|
| +++ b/pkg/analyzer/test/src/context/context_test.dart
|
| @@ -8,6 +8,7 @@ import 'dart:async';
|
| import 'dart:collection';
|
|
|
| import 'package:analyzer/dart/ast/ast.dart';
|
| +import 'package:analyzer/dart/ast/resolution_accessors.dart';
|
| import 'package:analyzer/dart/element/element.dart';
|
| import 'package:analyzer/dart/element/type.dart';
|
| import 'package:analyzer/dart/element/visitor.dart';
|
| @@ -2620,7 +2621,7 @@ void functionWithClosureAsDefaultParam([x = () => null]) {}
|
| CompilationUnit compilationUnit =
|
| context.resolveCompilationUnit2(sourceA, sourceA);
|
| expect(compilationUnit, isNotNull);
|
| - LibraryElement library = compilationUnit.element.library;
|
| + LibraryElement library = elementForCompilationUnit(compilationUnit).library;
|
| List<LibraryElement> importedLibraries = library.importedLibraries;
|
| assertNamedElements(importedLibraries, ["dart.core", "libB"]);
|
| }
|
| @@ -2632,7 +2633,7 @@ void functionWithClosureAsDefaultParam([x = () => null]) {}
|
| CompilationUnit compilationUnit =
|
| context.resolveCompilationUnit2(sourceA, sourceA);
|
| expect(compilationUnit, isNotNull);
|
| - LibraryElement library = compilationUnit.element.library;
|
| + LibraryElement library = elementForCompilationUnit(compilationUnit).library;
|
| List<LibraryElement> importedLibraries = library.importedLibraries;
|
| assertNamedElements(importedLibraries, ["dart.core", "libB"]);
|
| }
|
| @@ -4499,7 +4500,7 @@ main() {
|
| expect(context.getErrors(a).errors, hasLength(0));
|
| expect(context.getErrors(b).errors, hasLength(0));
|
| var unitA = context.getResolvedCompilationUnit2(a, a);
|
| - var unitElementA = unitA.element;
|
| + var unitElementA = elementForCompilationUnit(unitA);
|
| var libraryElementA = unitElementA.library;
|
| // Update a.dart, no declaration changes.
|
| context.setContents(
|
|
|