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

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

Issue 1956813004: Fixes for completing 'for (var v in^)' and 'if (v is^)'. (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
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/dart/optype.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/dart/imported_reference_contributor_test.dart
diff --git a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
index 51125e71526ede48d7d8b9c3389fa363448db05b..6382e35a6e1816311264f2f238df7b34da121922 100644
--- a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
@@ -313,7 +313,7 @@ class ImportedReferenceContributorTest extends DartCompletionContributorTest {
// The current DartCompletionRequest#resolveExpression resolves
// the world (which it should not) and causes the imported library
// to be resolved.
- assertSuggestFunction('hasLength', /* null */ 'bool');
+ assertSuggestFunction('hasLength', /* null */ 'bool');
assertNotSuggested('main');
}
@@ -2166,6 +2166,12 @@ int myFunc() {}
assertSuggestClass('int');
}
+ test_ForStatement_typing_inKeyword() async {
+ addTestSource('main() { for (var v i^) }');
+ await computeSuggestions();
+ assertNotSuggested('int');
Brian Wilkerson 2016/05/06 20:00:29 Should we also verify what *is* suggested?
scheglov 2016/05/06 20:04:42 Yes, we should and it exists. But completion tests
+ }
+
test_ForStatement_updaters() async {
// SimpleIdentifier ForStatement
addTestSource('main() {for (int index = 0; index < 10; i^)}');
@@ -2498,6 +2504,12 @@ class B extends A {
assertNotSuggested('==');
}
+ test_IfStatement_typing_isKeyword() async {
+ addTestSource('main() { if (v i^) }');
+ await computeSuggestions();
+ assertNotSuggested('int');
+ }
+
test_ImportDirective_dart() async {
// SimpleStringLiteral ImportDirective
addTestSource('''
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/dart/optype.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698