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

Issue 1285573003: suggest "in" in for statement (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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/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 22747cdcb24b97fbd246d8cce33603a687418f87..624aff293b72ad85736c52642962f87f81db59e8 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,18 @@ class KeywordContributorTest extends AbstractCompletionTest {
relevance: DART_RELEVANCE_HIGH);
}
+ test_for_expression_in() {
Brian Wilkerson 2015/08/10 13:56:18 It would be good to have some negative tests here
danrubel 2015/08/10 14:42:25 Good point. Added additional tests and handled new
+ addTestSource('main() {for (int x i^)}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([Keyword.IN], relevance: DART_RELEVANCE_HIGH);
+ }
+
+ test_for_expression_in2() {
Brian Wilkerson 2015/08/10 13:56:18 I'm not sure what the utility is of suggesting 'in
danrubel 2015/08/10 14:42:25 It's good to ensure "in" is in the list of suggest
+ addTestSource('main() {for (int x in^)}');
+ expect(computeFast(), isTrue);
+ assertSuggestKeywords([Keyword.IN], relevance: DART_RELEVANCE_HIGH);
+ }
+
test_function_async() {
addTestSource('main()^');
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