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/keyword_contributor_test.dart

Issue 1084233003: suggest this keyword in constructor param list (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 8 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 ca8a3932838cacb3e6b3a170f9ba828a563c1b4b..e09fd34e6d77fb9ae2001d73d02737e929f3a040 100644
--- a/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
@@ -337,6 +337,18 @@ class KeywordContributorTest extends AbstractCompletionTest {
assertSuggestKeywords([]);
}
+ test_constructor_param() {
+ addTestSource('class A { A(^) {});}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([Keyword.THIS]);
+ }
+
+ test_constructor_param2() {
+ addTestSource('class A { A(t^) {});}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([Keyword.THIS]);
+ }
+
test_empty() {
addTestSource('^');
expect(computeFast(), isTrue);
@@ -561,6 +573,18 @@ class A {
assertSuggestKeywords(STMT_START_IN_CLASS);
}
+ test_method_param() {
+ addTestSource('class A { foo(^) {});}');
+ expect(computeFast(), isTrue);
+ assertNoSuggestions();
+ }
+
+ test_method_param2() {
+ addTestSource('class A { foo(t^) {});}');
+ expect(computeFast(), isTrue);
+ assertNoSuggestions();
+ }
+
test_named_constructor_invocation() {
addTestSource('void main() {new Future.^}');
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