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

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

Issue 683133003: suggest imported functions in argument list (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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/imported_computer.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/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 b26ed4c2380c0b45e05a220d419555a0f0da6c1a..3d24ab72c626f7c917e5867cb6c62392a1fd7d8d 100644
--- a/pkg/analysis_server/test/services/completion/completion_test_util.dart
+++ b/pkg/analysis_server/test/services/completion/completion_test_util.dart
@@ -552,6 +552,21 @@ class AbstractSelectorSuggestionTest extends AbstractCompletionTest {
}
}
+ test_ArgumentList() {
+ // ArgumentList MethodInvocation ExpressionStatement Block
+ addSource('/libA.dart', '''
+ library A;
+ bool hasLength(int expected) { }''');
+ addTestSource('''
+ import '/libA.dart'
+ main() {expect(^)}''');
+ computeFast();
+ return computeFull(true).then((_) {
+ assertSuggestLocalFunction('main', null);
+ assertSuggestImportedFunction('hasLength', 'bool');
+ });
+ }
+
test_AssignmentExpression_name() {
// SimpleIdentifier VariableDeclaration VariableDeclarationList
// VariableDeclarationStatement Block
@@ -1399,16 +1414,6 @@ class AbstractSelectorSuggestionTest extends AbstractCompletionTest {
});
}
- test_PrefixedIdentifier_propertyAccess() {
- // PrefixedIdentifier ExpressionStatement Block BlockFunctionBody
- addTestSource('class A {String x; int get foo {x.^}');
- computeFast();
- return computeFull(true).then((_) {
- assertSuggestInvocationGetter('isEmpty', 'bool');
- assertSuggestInvocationMethod('compareTo', 'Comparable', 'int');
- });
- }
-
test_PrefixedIdentifier_class_imported() {
// SimpleIdentifier PrefixedIdentifier ExpressionStatement
addSource('/testB.dart', '''
@@ -1535,6 +1540,16 @@ class AbstractSelectorSuggestionTest extends AbstractCompletionTest {
});
}
+ test_PrefixedIdentifier_propertyAccess() {
+ // PrefixedIdentifier ExpressionStatement Block BlockFunctionBody
+ addTestSource('class A {String x; int get foo {x.^}');
+ computeFast();
+ return computeFull(true).then((_) {
+ assertSuggestInvocationGetter('isEmpty', 'bool');
+ assertSuggestInvocationMethod('compareTo', 'Comparable', 'int');
+ });
+ }
+
test_PropertyAccess_expression() {
// SimpleIdentifier MethodInvocation PropertyAccess ExpressionStatement
addTestSource('class A {a() {"hello".to^String().length}}');
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/imported_computer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698