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

Side by Side Diff: pkg/analysis_server/test/services/completion/prefixed_element_contributor_test.dart

Issue 1291283002: suggest prefixed constructors - fixes #23210 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/suggestion_builder.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.services.completion.invocation; 5 library test.services.completion.invocation;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/protocol.dart'; 9 import 'package:analysis_server/src/protocol.dart';
10 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart'; 10 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart';
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 } 234 }
235 235
236 test_libraryPrefix2() { 236 test_libraryPrefix2() {
237 // SimpleIdentifier MethodInvocation ExpressionStatement 237 // SimpleIdentifier MethodInvocation ExpressionStatement
238 addTestSource('import "dart:async" as bar; foo() {bar.^ print("f")}'); 238 addTestSource('import "dart:async" as bar; foo() {bar.^ print("f")}');
239 return computeFull((bool result) { 239 return computeFull((bool result) {
240 assertSuggestClass('Future'); 240 assertSuggestClass('Future');
241 }); 241 });
242 } 242 }
243 243
244 test_libraryPrefix3() {
245 // SimpleIdentifier MethodInvocation ExpressionStatement
246 addTestSource('import "dart:async" as bar; foo() {new bar.F^ print("f")}');
247 return computeFull((bool result) {
248 assertSuggestConstructor('Future');
249 assertSuggestConstructor('Future.delayed');
250 });
251 }
252
244 test_libraryPrefix_deferred() { 253 test_libraryPrefix_deferred() {
245 // SimpleIdentifier PrefixedIdentifier ExpressionStatement 254 // SimpleIdentifier PrefixedIdentifier ExpressionStatement
246 addTestSource('import "dart:async" deferred as bar; foo() {bar.^}'); 255 addTestSource('import "dart:async" deferred as bar; foo() {bar.^}');
247 return computeFull((bool result) { 256 return computeFull((bool result) {
248 assertSuggestClass('Future'); 257 assertSuggestClass('Future');
249 assertSuggestFunction('loadLibrary', 'Future<dynamic>'); 258 assertSuggestFunction('loadLibrary', 'Future<dynamic>');
250 }); 259 });
251 } 260 }
252 261
253 test_libraryPrefix_with_exports() { 262 test_libraryPrefix_with_exports() {
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 assertNotSuggested('ms2'); 666 assertNotSuggested('ms2');
658 assertSuggestInvocationMethod('m', 'C2', null, 667 assertSuggestInvocationMethod('m', 'C2', null,
659 relevance: DART_RELEVANCE_HIGH); 668 relevance: DART_RELEVANCE_HIGH);
660 assertNotSuggested('fi3'); 669 assertNotSuggested('fi3');
661 assertNotSuggested('fs3'); 670 assertNotSuggested('fs3');
662 assertNotSuggested('mi3'); 671 assertNotSuggested('mi3');
663 assertNotSuggested('ms3'); 672 assertNotSuggested('ms3');
664 }); 673 });
665 } 674 }
666 } 675 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/suggestion_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698