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

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

Issue 1151493004: no keyword suggestions in library identifier or property accessor (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 years, 6 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 cbf37941f30e74b9afc6bd6e1a4116b333c56455..55cf65959098d80d04de50ba39721ed3c8dc0978 100644
--- a/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
@@ -799,6 +799,24 @@ class A {
relevance: DART_RELEVANCE_HIGH);
}
+ test_library_declaration() {
+ addTestSource('library ^');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([]);
+ }
+
+ test_library_declaration2() {
+ addTestSource('library a^');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([]);
+ }
+
+ test_library_declaration3() {
+ addTestSource('library a.^');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([]);
+ }
+
test_library_name() {
addTestSource('library ^');
expect(computeFast(), isTrue);
@@ -996,6 +1014,12 @@ class A {
assertSuggestKeywords([]);
}
+ test_prefixed_library() {
+ addTestSource('import "b" as b; class A { foo() {b.^}}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([]);
+ }
+
test_prefixed_local() {
addTestSource('class A { foo() {int x; x.^}}');
expect(computeFast(), isTrue);
@@ -1008,6 +1032,12 @@ class A {
assertSuggestKeywords([]);
}
+ test_property_access() {
+ addTestSource('class A { get x => 7; foo() {new A().^}}');
+ 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