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

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

Issue 1158413003: remove keyword suggestions in constructor names and prefixed expressions (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 years, 7 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/analysis_server/lib/src/services/completion/keyword_contributor.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/keyword_contributor_test.dart
diff --git a/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart b/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
index a5219ff225672bba1ef384dd1dab9d8f10863da0..cbf37941f30e74b9afc6bd6e1a4116b333c56455 100644
--- a/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
@@ -939,6 +939,30 @@ class A {
assertSuggestKeywords([]);
}
+ test_newInstance() {
+ addTestSource('class A { foo() {new ^}}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([]);
+ }
+
+ test_newInstance2() {
+ addTestSource('class A { foo() {new ^ print("foo");}}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([]);
+ }
+
+ test_newInstance_prefixed() {
+ addTestSource('class A { foo() {new A.^}}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([]);
+ }
+
+ test_newInstance_prefixed2() {
+ addTestSource('class A { foo() {new A.^ print("foo");}}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([]);
+ }
+
test_part_of() {
addTestSource('part of foo;^');
expect(computeFast(), isTrue);
@@ -960,6 +984,30 @@ class A {
relevance: DART_RELEVANCE_HIGH);
}
+ test_prefixed_field() {
+ addTestSource('class A { int x; foo() {x.^}}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([]);
+ }
+
+ test_prefixed_field2() {
+ addTestSource('class A { int x; foo() {x.^ print("foo");}}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([]);
+ }
+
+ test_prefixed_local() {
+ addTestSource('class A { foo() {int x; x.^}}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([]);
+ }
+
+ test_prefixed_local2() {
+ addTestSource('class A { foo() {int x; x.^ print("foo");}}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([]);
+ }
+
test_switch_expression() {
addTestSource('main() {switch(^) {}}');
expect(computeFast(), isTrue);
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/keyword_contributor.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698