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

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

Issue 1285573003: suggest "in" in for statement (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 years, 4 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/test/completion_test.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 22747cdcb24b97fbd246d8cce33603a687418f87..900062c9c1e2b7c92baa279c992c9657b26fd4a2 100644
--- a/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/keyword_contributor_test.dart
@@ -517,6 +517,32 @@ class KeywordContributorTest extends AbstractCompletionTest {
relevance: DART_RELEVANCE_HIGH);
}
+ test_for_expression_in() {
+ addTestSource('main() {for (int x i^)}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([Keyword.IN], relevance: DART_RELEVANCE_HIGH);
+ }
+
+ test_for_expression_in2() {
+ addTestSource('main() {for (int x in^)}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([Keyword.IN], relevance: DART_RELEVANCE_HIGH);
+ }
+
+ test_for_expression_init() {
+ addTestSource('main() {for (int x = i^)}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords(
+ [Keyword.FALSE, Keyword.NEW, Keyword.NULL, Keyword.TRUE]);
+ }
+
+ test_for_expression_init2() {
+ addTestSource('main() {for (int x = in^)}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords(
+ [Keyword.FALSE, Keyword.NEW, Keyword.NULL, Keyword.TRUE]);
+ }
+
test_function_async() {
addTestSource('main()^');
expect(computeFast(), isTrue);
« no previous file with comments | « pkg/analysis_server/test/completion_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698