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

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

Issue 693573003: add suggestions in format parameter 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 e8500aa5225ad6baa3cc1816e449c2b416879ed7..148b013867c104aa69b4de06b01aec3c8c72845b 100644
--- a/pkg/analysis_server/test/services/completion/completion_test_util.dart
+++ b/pkg/analysis_server/test/services/completion/completion_test_util.dart
@@ -674,14 +674,19 @@ class AbstractSelectorSuggestionTest extends AbstractCompletionTest {
void baz() { }''');
addTestSource('''
import '/libA.dart'
+ class B { }
String bar() => true;
void main() {expect(^)}''');
computeFast();
return computeFull(true).then((_) {
assertSuggestLocalFunction('bar', 'String');
assertSuggestImportedFunction('hasLength', 'bool');
+ assertSuggestImportedFunction('identical', 'bool');
+ assertSuggestLocalClass('B');
+ assertSuggestImportedClass('Object');
assertNotSuggested('main');
assertNotSuggested('baz');
+ assertNotSuggested('print');
});
}
@@ -1596,6 +1601,23 @@ class AbstractSelectorSuggestionTest extends AbstractCompletionTest {
});
}
+ test_FormalParameterList() {
+ // FormalParameterList MethodDeclaration
+ addTestSource('''
+ foo() { }
+ void bar() { }
+ class A {a(^) { }}''');
+ computeFast();
+ return computeFull(true).then((_) {
+ assertSuggestLocalFunction('foo', null);
+ assertSuggestLocalMethod('a', 'A', null);
+ assertSuggestLocalClass('A');
+ assertSuggestImportedClass('String');
+ assertSuggestImportedFunction('identical', 'bool');
+ assertNotSuggested('bar');
+ });
+ }
+
test_MethodInvocation_no_semicolon() {
// MethodInvocation ExpressionStatement Block
addTestSource('''
« 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