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 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; | 5 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; |
6 import 'package:analysis_server/src/services/completion/dart/static_member_contr
ibutor.dart'; | 6 import 'package:analysis_server/src/services/completion/dart/static_member_contr
ibutor.dart'; |
7 import 'package:test/test.dart'; | 7 import 'package:test/test.dart'; |
8 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 8 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
9 | 9 |
10 import 'completion_contributor_util.dart'; | 10 import 'completion_contributor_util.dart'; |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 // SimpleIdentifier PrefixedIdentifier ExpressionStatement | 233 // SimpleIdentifier PrefixedIdentifier ExpressionStatement |
234 addTestSource(''' | 234 addTestSource(''' |
235 import "dart:async" as async; | 235 import "dart:async" as async; |
236 void main() {async.Future.^.w()}'''); | 236 void main() {async.Future.^.w()}'''); |
237 await computeSuggestions(); | 237 await computeSuggestions(); |
238 assertSuggestMethod('wait', 'Future', 'Future<dynamic>'); | 238 assertSuggestMethod('wait', 'Future', 'Future<dynamic>'); |
239 } | 239 } |
240 | 240 |
241 test_PrefixedIdentifier_class_const() async { | 241 test_PrefixedIdentifier_class_const() async { |
242 // SimpleIdentifier PrefixedIdentifier ExpressionStatement Block | 242 // SimpleIdentifier PrefixedIdentifier ExpressionStatement Block |
243 addSource( | 243 addSource('/testB.dart', ''' |
244 '/testB.dart', | |
245 ''' | |
246 lib B; | 244 lib B; |
247 class I { | 245 class I { |
248 static const scI = 'boo'; | 246 static const scI = 'boo'; |
249 X get f => new A(); | 247 X get f => new A(); |
250 get _g => new A();} | 248 get _g => new A();} |
251 class B implements I { | 249 class B implements I { |
252 static const int scB = 12; | 250 static const int scB = 12; |
253 var b; X _c; | 251 var b; X _c; |
254 X get d => new A();get _e => new A(); | 252 X get d => new A();get _e => new A(); |
255 set s1(I x) {} set _s2(I x) {} | 253 set s1(I x) {} set _s2(I x) {} |
(...skipping 22 matching lines...) Expand all Loading... |
278 assertNotSuggested('m'); | 276 assertNotSuggested('m'); |
279 assertNotSuggested('_n'); | 277 assertNotSuggested('_n'); |
280 assertNotSuggested('a'); | 278 assertNotSuggested('a'); |
281 assertNotSuggested('A'); | 279 assertNotSuggested('A'); |
282 assertNotSuggested('X'); | 280 assertNotSuggested('X'); |
283 assertNotSuggested('w'); | 281 assertNotSuggested('w'); |
284 assertNotSuggested('Object'); | 282 assertNotSuggested('Object'); |
285 assertNotSuggested('=='); | 283 assertNotSuggested('=='); |
286 } | 284 } |
287 } | 285 } |
OLD | NEW |