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

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

Issue 635043002: show only type names in is expression RHS (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge 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/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 7b732eccd7b580814fe98c48060b82309d20f598..00eed4b450c40e83a7af7651c3acfdf5877d1a79 100644
--- a/pkg/analysis_server/test/services/completion/completion_test_util.dart
+++ b/pkg/analysis_server/test/services/completion/completion_test_util.dart
@@ -378,8 +378,9 @@ class AbstractSelectorSuggestionTest extends AbstractCompletionTest {
}
}
- CompletionSuggestion assertSuggestInvocationGetter(String name, String returnType,
- [CompletionRelevance relevance = CompletionRelevance.DEFAULT]) {
+ CompletionSuggestion assertSuggestInvocationGetter(String name,
+ String returnType, [CompletionRelevance relevance =
+ CompletionRelevance.DEFAULT]) {
if (computer is InvocationComputer) {
return assertSuggestGetter(name, returnType, relevance);
} else {
@@ -505,4 +506,24 @@ class AbstractSelectorSuggestionTest extends AbstractCompletionTest {
assertSuggestImportedClass('Object');
});
}
+
+ test_IsExpression_type() {
+ // SimpleIdentifier TypeName IsExpression IfStatement
+ addSource('/testB.dart', '''
+ lib B;
+ foo() { }
+ class X {X.c(); X._d(); z() {}}''');
+ addTestSource('''
+ import "/testB.dart";
+ class Y {Y.c(); Y._d(); z() {}}
+ main() {var x; if (x is ^) { }}''');
+ computeFast();
+ return computeFull(true).then((_) {
+ assertSuggestImportedClass('X');
+ assertSuggestLocalClass('Y');
+ assertNotSuggested('x');
+ assertNotSuggested('main');
+ assertNotSuggested('foo');
+ });
+ }
}

Powered by Google App Engine
This is Rietveld 408576698