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

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

Issue 783383003: code completion for dynamic type elements (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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/completion_test_util.dart
diff --git a/pkg/analysis_server/test/services/completion/completion_test_util.dart b/pkg/analysis_server/test/services/completion/completion_test_util.dart
index 632f30a01d43be948b55626438860470dcbbb46f..362b8e825d2b268213f6c9f4011dc58730198548 100644
--- a/pkg/analysis_server/test/services/completion/completion_test_util.dart
+++ b/pkg/analysis_server/test/services/completion/completion_test_util.dart
@@ -1271,6 +1271,34 @@ abstract class AbstractSelectorSuggestionTest extends AbstractCompletionTest {
});
}
+ test_ConditionalExpression_empty() {
+ // SimpleIdentifier PrefixIdentifier IfStatement
+ addTestSource('''
+ class A {var b; X _c; foo() {A a; if (^) something}}''');
+ computeFast();
+ return computeFull((bool result) {
+ assertSuggestLocalGetter('b', null);
+ assertSuggestLocalGetter('_c', 'X');
+ assertSuggestImportedClass('Object');
+ assertSuggestLocalClass('A');
+ assertNotSuggested('==');
+ });
+ }
+
+ test_ConditionalExpression_invocation() {
+ // SimpleIdentifier PrefixIdentifier IfStatement
+ addTestSource('''
+ main() {var a; if (a.^) something}''');
+ computeFast();
+ return computeFull((bool result) {
+ assertSuggestInvocationMethod('toString', 'Object', 'String');
+ //TODO (danrubel) type for '_c' should be 'X' not null
+ assertNotSuggested('Object');
+ assertNotSuggested('A');
+ assertNotSuggested('==');
+ });
+ }
+
test_ConstructorName_importedClass() {
// SimpleIdentifier PrefixedIdentifier TypeName ConstructorName
// InstanceCreationExpression
« no previous file with comments | « pkg/analysis_server/test/mock_sdk.dart ('k') | pkg/analysis_server/test/services/search/hierarchy_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698