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

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

Issue 634653002: add named constructor, cascade selector suggestions and more tests (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
Index: pkg/analysis_server/test/services/completion/imported_computer_test.dart
diff --git a/pkg/analysis_server/test/services/completion/imported_computer_test.dart b/pkg/analysis_server/test/services/completion/imported_computer_test.dart
index 7934201135880601e3d9c077b030883ea87b3a9a..f97dc7ef2dc905181c19a4e0630c71059af57884 100644
--- a/pkg/analysis_server/test/services/completion/imported_computer_test.dart
+++ b/pkg/analysis_server/test/services/completion/imported_computer_test.dart
@@ -296,6 +296,33 @@ class ImportedTypeComputerTest extends AbstractCompletionTest {
});
}
+ xtest_ConstructorName_importedClass() {
+ // SimpleIdentifier PrefixedIdentifier TypeName ConstructorName
+ // InstanceCreationExpression
+ addSource('/testB.dart', '''
+ lib B;
+ class X {X.c(); X._d(); z() {}}''');
+ addTestSource('''
+ import "/testB.dart";
+ var m;
+ main() {new X.^}''');
+ return computeFull().then((_) {
+ assertNoSuggestions();
+ });
+ }
+
+ xtest_ConstructorName_localClass() {
+ // SimpleIdentifier PrefixedIdentifier TypeName ConstructorName
+ // InstanceCreationExpression
+ addTestSource('''
+ var m;
+ class X {X.c(); X._d(); z() {}}
+ main() {new X.^}''');
+ return computeFull().then((_) {
+ assertNoSuggestions();
+ });
+ }
+
// TODO (danrubel) implement
xtest_InstanceCreationExpression() {
// SimpleIdentifier TypeName ConstructorName InstanceCreationExpression
@@ -316,6 +343,35 @@ class ImportedTypeComputerTest extends AbstractCompletionTest {
}
// TODO (danrubel) implement
+ xtest_IsExpression_imported() {
+ // SimpleIdentifier TypeName IsExpression IfStatement
+ addSource('/testB.dart', '''
+ lib B;
+ class X {X.c(); X._d(); z() {}}''');
+ addTestSource('''
+ import "/testB.dart";
+ main() {var x; if (x is ^) { }}''');
+ return computeFull().then((_) {
+ assertSuggestConstructor('c');
+ assertNotSuggested('main');
+ assertNotSuggested('X');
+ assertNotSuggested('B');
+ assertNotSuggested('x');
+ });
+ }
+
+ // TODO (danrubel) implement
+ xtest_IsExpression_local() {
+ // SimpleIdentifier TypeName IsExpression IfStatement
+ addTestSource('''
+ class X {X.c(); X._d(); z() {}}
+ main() {var x; if (x is ^) { }}''');
+ return computeFull().then((_) {
+ assertNoSuggestions();
+ });
+ }
+
+ // TODO (danrubel) implement
xtest_VariableDeclarationStatement_RHS() {
// SimpleIdentifier VariableDeclaration VariableDeclarationList
// VariableDeclarationStatement

Powered by Google App Engine
This is Rietveld 408576698