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

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

Issue 2689343003: Fixes for referenced names computing. (Closed)
Patch Set: Created 3 years, 10 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/lib/src/dart/analysis/referenced_names.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/referenced_names_test.dart
diff --git a/pkg/analyzer/test/src/dart/analysis/referenced_names_test.dart b/pkg/analyzer/test/src/dart/analysis/referenced_names_test.dart
index f35be9bbf0eb72081cefb5e980ce53a4b49c4127..2a0ea6c919a541b09b4797234dbb56b2bf080ee2 100644
--- a/pkg/analyzer/test/src/dart/analysis/referenced_names_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/referenced_names_test.dart
@@ -28,6 +28,18 @@ class U {
expect(names, unorderedEquals(['A', 'B', 'C']));
}
+ test_class_constructor_parameters() {
+ Set<String> names = _computeReferencedNames('''
+class U {
+ U(A a) {
+ a;
+ b;
+ }
+}
+''');
+ expect(names, unorderedEquals(['A', 'b']));
+ }
+
test_class_field() {
Set<String> names = _computeReferencedNames('''
class U {
@@ -120,6 +132,16 @@ class U {
expect(names, unorderedEquals(['A', 'b']));
}
+ test_class_method_parameters_dontHideNamedExpressionName() {
+ Set<String> names = _computeReferencedNames('''
+main() {
+ var p;
+ new C(p: p);
+}
+''');
+ expect(names, unorderedEquals(['C', 'p']));
+ }
+
test_class_method_typeParameters() {
Set<String> names = _computeReferencedNames('''
class U {
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/referenced_names.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698