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

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

Issue 1141443002: suggest keywords for more expressions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 46940bf2c9ebab489990cb0926d07079d237fcef..fefa50c36459096b12d4e9ae918eb59e626380f7 100644
--- a/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
@@ -880,6 +880,24 @@ class A {
assertSuggestKeywords(EXPRESSION_START_INSTANCE, pseudoKeywords: ['await']);
}
+ test_method_body_expression1() {
+ addTestSource('class A { foo() {return b == true ? ^}}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords(EXPRESSION_START_INSTANCE);
+ }
+
+ test_method_body_expression2() {
+ addTestSource('class A { foo() {return b == true ? 1 : ^}}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords(EXPRESSION_START_INSTANCE);
+ }
+
+ test_method_body_return() {
+ addTestSource('class A { foo() {return ^}}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords(EXPRESSION_START_INSTANCE);
+ }
+
test_method_param() {
addTestSource('class A { foo(^) {});}');
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