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

Unified Diff: pkg/analyzer/test/src/dart/element/element_test.dart

Issue 2336913002: Remove LibraryElement.visibleLibraries. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « pkg/analyzer/test/src/context/context_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/dart/element/element_test.dart
diff --git a/pkg/analyzer/test/src/dart/element/element_test.dart b/pkg/analyzer/test/src/dart/element/element_test.dart
index 5a6f5bfda08a404f5fb2b3734b209001ecad4ba0..97a687a792ebb2c555faa3fea3afad6ac28a2a5b 100644
--- a/pkg/analyzer/test/src/dart/element/element_test.dart
+++ b/pkg/analyzer/test/src/dart/element/element_test.dart
@@ -3842,81 +3842,6 @@ class LibraryElementImplTest extends EngineTestCase {
unorderedEquals(<CompilationUnitElement>[unitLib, unitA, unitB]));
}
- void test_getVisibleLibraries_cycle() {
- AnalysisContext context = createAnalysisContext();
- LibraryElementImpl library = ElementFactory.library(context, "app");
- LibraryElementImpl libraryA = ElementFactory.library(context, "A");
- libraryA.imports = <ImportElementImpl>[
- ElementFactory.importFor(library, null)
- ];
- library.imports = <ImportElementImpl>[
- ElementFactory.importFor(libraryA, null)
- ];
- List<LibraryElement> libraries = library.visibleLibraries;
- expect(libraries, unorderedEquals(<LibraryElement>[library, libraryA]));
- }
-
- void test_getVisibleLibraries_directExports() {
- AnalysisContext context = createAnalysisContext();
- LibraryElementImpl library = ElementFactory.library(context, "app");
- LibraryElementImpl libraryA = ElementFactory.library(context, "A");
- library.exports = <ExportElementImpl>[ElementFactory.exportFor(libraryA)];
- List<LibraryElement> libraries = library.visibleLibraries;
- expect(libraries, unorderedEquals(<LibraryElement>[library]));
- }
-
- void test_getVisibleLibraries_directImports() {
- AnalysisContext context = createAnalysisContext();
- LibraryElementImpl library = ElementFactory.library(context, "app");
- LibraryElementImpl libraryA = ElementFactory.library(context, "A");
- library.imports = <ImportElementImpl>[
- ElementFactory.importFor(libraryA, null)
- ];
- List<LibraryElement> libraries = library.visibleLibraries;
- expect(libraries, unorderedEquals(<LibraryElement>[library, libraryA]));
- }
-
- void test_getVisibleLibraries_indirectExports() {
- AnalysisContext context = createAnalysisContext();
- LibraryElementImpl library = ElementFactory.library(context, "app");
- LibraryElementImpl libraryA = ElementFactory.library(context, "A");
- LibraryElementImpl libraryAA = ElementFactory.library(context, "AA");
- libraryA.exports = <ExportElementImpl>[ElementFactory.exportFor(libraryAA)];
- library.imports = <ImportElementImpl>[
- ElementFactory.importFor(libraryA, null)
- ];
- List<LibraryElement> libraries = library.visibleLibraries;
- expect(libraries,
- unorderedEquals(<LibraryElement>[library, libraryA, libraryAA]));
- }
-
- void test_getVisibleLibraries_indirectImports() {
- AnalysisContext context = createAnalysisContext();
- LibraryElementImpl library = ElementFactory.library(context, "app");
- LibraryElementImpl libraryA = ElementFactory.library(context, "A");
- LibraryElementImpl libraryAA = ElementFactory.library(context, "AA");
- LibraryElementImpl libraryB = ElementFactory.library(context, "B");
- libraryA.imports = <ImportElementImpl>[
- ElementFactory.importFor(libraryAA, null)
- ];
- library.imports = <ImportElementImpl>[
- ElementFactory.importFor(libraryA, null),
- ElementFactory.importFor(libraryB, null)
- ];
- List<LibraryElement> libraries = library.visibleLibraries;
- expect(
- libraries,
- unorderedEquals(
- <LibraryElement>[library, libraryA, libraryAA, libraryB]));
- }
-
- void test_getVisibleLibraries_noImports() {
- AnalysisContext context = createAnalysisContext();
- LibraryElementImpl library = ElementFactory.library(context, "app");
- expect(
- library.visibleLibraries, unorderedEquals(<LibraryElement>[library]));
- }
-
void test_invalidateLibraryCycles_withHandle() {
AnalysisContext context = createAnalysisContext();
context.sourceFactory = new SourceFactory([]);
« no previous file with comments | « pkg/analyzer/test/src/context/context_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698