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

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

Issue 1963323003: More tweaks for 'for' completion. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
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 10eb19116588d4f6ad90be5b48a8f3c15e1a6a54..a52a8621a181cb8583177f811e47cf17a33e220c 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
@@ -658,6 +658,12 @@ class KeywordContributorTest extends DartCompletionContributorTest {
assertSuggestKeywords([Keyword.IN], relevance: DART_RELEVANCE_HIGH);
}
+ test_for_expression_in_inInitializer() async {
+ addTestSource('main() {for (int i^)}');
+ await computeSuggestions();
+ assertSuggestKeywords([]);
+ }
+
test_for_expression_init() async {
addTestSource('main() {for (int x = i^)}');
await computeSuggestions();
@@ -671,10 +677,9 @@ class KeywordContributorTest extends DartCompletionContributorTest {
}
test_for_initialization_var() async {
- addTestSource('main() {for (va^)}');
+ addTestSource('main() {for (^)}');
await computeSuggestions();
- assertSuggestKeywords([Keyword.FINAL, Keyword.VAR],
- relevance: DART_RELEVANCE_HIGH);
+ assertSuggestKeywords([Keyword.VAR], relevance: DART_RELEVANCE_HIGH);
}
test_function_async() async {

Powered by Google App Engine
This is Rietveld 408576698