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

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

Issue 1263093003: include exported library namespace in prefixed import suggestions (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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 test_libraryPrefix_deferred() { 236 test_libraryPrefix_deferred() {
237 // SimpleIdentifier PrefixedIdentifier ExpressionStatement 237 // SimpleIdentifier PrefixedIdentifier ExpressionStatement
238 addTestSource('import "dart:async" deferred as bar; foo() {bar.^}'); 238 addTestSource('import "dart:async" deferred as bar; foo() {bar.^}');
239 return computeFull((bool result) { 239 return computeFull((bool result) {
240 assertSuggestClass('Future'); 240 assertSuggestClass('Future');
241 assertSuggestFunction('loadLibrary', 'void'); 241 assertSuggestFunction('loadLibrary', 'void');
242 }); 242 });
243 } 243 }
244 244
245 test_libraryPrefix_with_exports() {
246 addSource('/libA.dart', 'library libA; class A { }');
247 addSource('/libB.dart', 'library libB; export "/libA.dart"; class B { }');
248 addTestSource('import "/libB.dart" as foo; main() {foo.^} class C { }');
249 computeFast();
250 return computeFull((bool result) {
251 assertSuggestClass('B');
252 assertSuggestClass('A');
253 });
254 }
255
245 test_local() { 256 test_local() {
246 addTestSource('foo() {String x = "bar"; x.^}'); 257 addTestSource('foo() {String x = "bar"; x.^}');
247 return computeFull((bool result) { 258 return computeFull((bool result) {
248 assertSuggestGetter('length', 'int'); 259 assertSuggestGetter('length', 'int');
249 }); 260 });
250 } 261 }
251 262
252 test_local_is() { 263 test_local_is() {
253 addTestSource('foo() {var x; if (x is String) x.^}'); 264 addTestSource('foo() {var x; if (x is String) x.^}');
254 return computeFull((bool result) { 265 return computeFull((bool result) {
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 assertNotSuggested('ms2'); 649 assertNotSuggested('ms2');
639 assertSuggestInvocationMethod('m', 'C2', null, 650 assertSuggestInvocationMethod('m', 'C2', null,
640 relevance: DART_RELEVANCE_HIGH); 651 relevance: DART_RELEVANCE_HIGH);
641 assertNotSuggested('fi3'); 652 assertNotSuggested('fi3');
642 assertNotSuggested('fs3'); 653 assertNotSuggested('fs3');
643 assertNotSuggested('mi3'); 654 assertNotSuggested('mi3');
644 assertNotSuggested('ms3'); 655 assertNotSuggested('ms3');
645 }); 656 });
646 } 657 }
647 } 658 }
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