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

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

Issue 2670843004: Record defined top-level/class-mebber names with unlinked bundles. (Closed)
Patch Set: Created 3 years, 11 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/dart/analysis/defined_names_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/analysis/file_state_test.dart
diff --git a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
index 0da912e066a594298854c45106e83dc0cabbf28f..79f6f3abc44abd358491e0f3c96bec2a9f73c14b 100644
--- a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
@@ -62,6 +62,46 @@ class FileSystemStateTest {
provider, sourceFactory, analysisOptions, new Uint32List(0));
}
+ test_definedClassMemberNames() {
+ String path = _p('/aaa/lib/a.dart');
+ provider.newFile(
+ path,
+ r'''
+class A {
+ int a, b;
+ A();
+ A.c();
+ d() {}
+ get e => null;
+ set f(_) {}
+}
+class B {
+ g() {}
+}
+''');
+ FileState file = fileSystemState.getFileForPath(path);
+ expect(file.definedClassMemberNames,
+ unorderedEquals(['a', 'b', 'd', 'e', 'f', 'g']));
+ }
+
+ test_definedTopLevelNames() {
+ String path = _p('/aaa/lib/a.dart');
+ provider.newFile(
+ path,
+ r'''
+class A {}
+class B = Object with A;
+typedef C {}
+D() {}
+get E => null;
+set F(_) {}
+var G, H;
+''');
+ FileState file = fileSystemState.getFileForPath(path);
+ expect(file.definedTopLevelNames,
+ unorderedEquals(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H']));
+ }
+
test_exportedTopLevelDeclarations_export() {
String a = _p('/aaa/lib/a.dart');
String b = _p('/aaa/lib/b.dart');
« no previous file with comments | « pkg/analyzer/test/src/dart/analysis/defined_names_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698