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

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

Issue 2864233002: improve completion for formal param initializers (Closed)
Patch Set: rebase Created 3 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/dart/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/dart/keyword_contributor_test.dart
diff --git a/pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart
index a3c9ac65ee201d38b93d2adc1eac8d181a334122..2adcb384a0bc87b8d13b8b7d0b114c5547d72344 100644
--- a/pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart
@@ -1573,6 +1573,34 @@ class A {
expect(suggestions, isEmpty);
}
+ test_method_param_named_init() async {
+ addTestSource('class A { foo({bool bar: ^}) {}}');
+ await computeSuggestions();
+ expect(suggestions, isNotEmpty);
+ assertSuggestKeywords(EXPRESSION_START_NO_INSTANCE);
+ }
+
+ test_method_param_named_init2() async {
+ addTestSource('class A { foo({bool bar: f^}) {}}');
+ await computeSuggestions();
+ expect(suggestions, isNotEmpty);
+ assertSuggestKeywords(EXPRESSION_START_NO_INSTANCE);
+ }
+
+ test_method_param_positional_init() async {
+ addTestSource('class A { foo([bool bar = ^]) {}}');
+ await computeSuggestions();
+ expect(suggestions, isNotEmpty);
+ assertSuggestKeywords(EXPRESSION_START_NO_INSTANCE);
+ }
+
+ test_method_param_positional_init2() async {
+ addTestSource('class A { foo([bool bar = f^]) {}}');
+ await computeSuggestions();
+ expect(suggestions, isNotEmpty);
+ assertSuggestKeywords(EXPRESSION_START_NO_INSTANCE);
+ }
+
test_named_constructor_invocation() async {
addTestSource('void main() {new Future.^}');
await computeSuggestions();
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698