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

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

Issue 2520593003: Use AnalysisDriverUnlinkedUnit as a container for UnlinkedUnit and referenced names. (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
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 2ef6802a9a377c2fa11af4a92520a7b7e48065b2..60b4622dce65d022e760a6bba552addba8933bf3 100644
--- a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
@@ -211,6 +211,21 @@ part 'not-a2.dart';
expect(files, [filePackageUri, fileFileUri]);
}
+ test_referencedNames() {
+ String path = _p('/aaa/lib/a.dart');
+ provider.newFile(
+ path,
+ r'''
+A foo(B p) {
+ foo(null);
+ C c = new C(p);
+ return c;
+}
+''');
+ FileState file = fileSystemState.getFileForPath(path);
+ expect(file.referencedNames, unorderedEquals(['A', 'B', 'C']));
+ }
+
test_refresh_differentApiSignature() {
String path = _p('/aaa/lib/a.dart');
provider.newFile(
« pkg/analyzer/lib/src/dart/analysis/file_state.dart ('K') | « pkg/analyzer/lib/src/summary/idl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698