OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |