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

Unified Diff: pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart

Issue 1509723004: do not suggest static methods from superclass - fixes #24258 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 years 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/analysis_server/test/completion_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
diff --git a/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
index d94ae5899ef9ade6d7d6031276061b17f15131ca..345c6558b68379b87957acdb2245218b00e608d8 100644
--- a/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/static_member_contributor_test.dart
@@ -63,8 +63,8 @@ class StaticMemberContributorTest extends DartCompletionContributorTest {
expect(replacementOffset, completionOffset);
expect(replacementLength, 0);
assertSuggestField('scA', 'String');
- assertSuggestField('scB', 'int');
- assertSuggestField('scI', null);
+ assertNotSuggested('scB');
+ assertNotSuggested('scI');
assertNotSuggested('b');
assertNotSuggested('_c');
assertNotSuggested('d');
@@ -122,7 +122,10 @@ class StaticMemberContributorTest extends DartCompletionContributorTest {
test_only_static() async {
// SimpleIdentifier PrefixedIdentifier ExpressionStatement
addTestSource('''
-class C {
+class B {
+ static int b1;
+}
+class C extends B {
int f1;
static int f2;
m1() {}
@@ -130,6 +133,7 @@ class C {
}
void main() {C.^}''');
await computeSuggestions();
+ assertNotSuggested('b1');
assertNotSuggested('f1');
assertSuggestField('f2', 'int');
assertNotSuggested('m1');
@@ -139,7 +143,10 @@ void main() {C.^}''');
test_only_static2() async {
// SimpleIdentifier MethodInvocation ExpressionStatement
addTestSource('''
-class C {
+class B {
+ static int b1;
+}
+class C extends B {
int f1;
static int f2;
m1() {}
@@ -147,6 +154,7 @@ class C {
}
void main() {C.^ print("something");}''');
await computeSuggestions();
+ assertNotSuggested('b1');
assertNotSuggested('f1');
assertSuggestField('f2', 'int');
assertNotSuggested('m1');
« no previous file with comments | « pkg/analysis_server/test/completion_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698