| 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.util; | 5 library test.services.completion.util; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/protocol.dart' as protocol show Element, | 9 import 'package:analysis_server/src/protocol.dart' as protocol show Element, |
| 10 ElementKind; | 10 ElementKind; |
| (...skipping 2310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2321 assertSuggestImportedFunction('nowIsIt', null); | 2321 assertSuggestImportedFunction('nowIsIt', null); |
| 2322 assertNotSuggested('T1'); | 2322 assertNotSuggested('T1'); |
| 2323 // TODO (danrubel) this really should be TopLevelVar not getter/setter | 2323 // TODO (danrubel) this really should be TopLevelVar not getter/setter |
| 2324 assertSuggestTopLevelVarGetterSetter('newT1', 'int'); | 2324 assertSuggestTopLevelVarGetterSetter('newT1', 'int'); |
| 2325 assertNotSuggested('z'); | 2325 assertNotSuggested('z'); |
| 2326 assertSuggestLocalTopLevelVar('m', 'dynamic'); | 2326 assertSuggestLocalTopLevelVar('m', 'dynamic'); |
| 2327 assertSuggestLocalFunction('newer', 'String'); | 2327 assertSuggestLocalFunction('newer', 'String'); |
| 2328 }); | 2328 }); |
| 2329 } | 2329 } |
| 2330 | 2330 |
| 2331 test_Literal_list() { |
| 2332 // ']' ListLiteral ArgumentList MethodInvocation |
| 2333 addTestSource('main() {var Some; print([^]);}'); |
| 2334 computeFast(); |
| 2335 return computeFull((bool result) { |
| 2336 assertSuggestLocalVariable('Some', null); |
| 2337 assertSuggestImportedClass('String'); |
| 2338 }); |
| 2339 } |
| 2340 |
| 2341 test_Literal_list2() { |
| 2342 // SimpleIdentifier ListLiteral ArgumentList MethodInvocation |
| 2343 addTestSource('main() {var Some; print([S^]);}'); |
| 2344 computeFast(); |
| 2345 return computeFull((bool result) { |
| 2346 assertSuggestLocalVariable('Some', null); |
| 2347 assertSuggestImportedClass('String'); |
| 2348 }); |
| 2349 } |
| 2350 |
| 2331 test_Literal_string() { | 2351 test_Literal_string() { |
| 2332 // SimpleStringLiteral ExpressionStatement Block | 2352 // SimpleStringLiteral ExpressionStatement Block |
| 2333 addTestSource('class A {a() {"hel^lo"}}'); | 2353 addTestSource('class A {a() {"hel^lo"}}'); |
| 2334 computeFast(); | 2354 computeFast(); |
| 2335 return computeFull((bool result) { | 2355 return computeFull((bool result) { |
| 2336 assertNoSuggestions(); | 2356 assertNoSuggestions(); |
| 2337 }); | 2357 }); |
| 2338 } | 2358 } |
| 2339 | 2359 |
| 2340 test_MethodDeclaration_body_getters() { | 2360 test_MethodDeclaration_body_getters() { |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2947 assertNotSuggested('bar2'); | 2967 assertNotSuggested('bar2'); |
| 2948 assertNotSuggested('_B'); | 2968 assertNotSuggested('_B'); |
| 2949 assertSuggestLocalClass('Y'); | 2969 assertSuggestLocalClass('Y'); |
| 2950 assertSuggestLocalClass('C'); | 2970 assertSuggestLocalClass('C'); |
| 2951 assertSuggestLocalVariable('f', null); | 2971 assertSuggestLocalVariable('f', null); |
| 2952 assertNotSuggested('x'); | 2972 assertNotSuggested('x'); |
| 2953 assertNotSuggested('e'); | 2973 assertNotSuggested('e'); |
| 2954 }); | 2974 }); |
| 2955 } | 2975 } |
| 2956 } | 2976 } |
| OLD | NEW |