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

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

Issue 1135613004: suggest async for closures (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 fefa50c36459096b12d4e9ae918eb59e626380f7..95691418e39609e384cb6843dfd4a3b5bd2937dd 100644
--- a/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
@@ -258,6 +258,25 @@ class KeywordContributorTest extends AbstractCompletionTest {
relevance: DART_RELEVANCE_HIGH);
}
+ test_anonymous_function_async() {
+ addTestSource('main() {foo(() ^ {}}}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([],
+ pseudoKeywords: ['async'], relevance: DART_RELEVANCE_HIGH);
+ }
+
+ test_anonymous_function_async2() {
+ addTestSource('main() {foo(() a^ {}}}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords(STMT_START_OUTSIDE_CLASS, pseudoKeywords: ['async']);
+ }
+
+ test_anonymous_function_async3() {
+ addTestSource('main() {foo(() async ^ {}}}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([]);
+ }
+
test_argument() {
addTestSource('main() {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