| 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.contributor.dart.local_ref; | 5 library test.services.completion.contributor.dart.local_ref; |
| 6 | 6 |
| 7 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol | 7 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol |
| 8 show Element, ElementKind; | 8 show Element, ElementKind; |
| 9 import 'package:analysis_server/plugin/protocol/protocol.dart' | 9 import 'package:analysis_server/plugin/protocol/protocol.dart' |
| 10 hide Element, ElementKind; | 10 hide Element, ElementKind; |
| (...skipping 2152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2163 assertSuggestLocalVariable('index', 'int'); | 2163 assertSuggestLocalVariable('index', 'int'); |
| 2164 } | 2164 } |
| 2165 | 2165 |
| 2166 test_ForStatement_initializer() async { | 2166 test_ForStatement_initializer() async { |
| 2167 // SimpleIdentifier ForStatement | 2167 // SimpleIdentifier ForStatement |
| 2168 addTestSource('main() {List a; for (^)}'); | 2168 addTestSource('main() {List a; for (^)}'); |
| 2169 await computeSuggestions(); | 2169 await computeSuggestions(); |
| 2170 | 2170 |
| 2171 expect(replacementOffset, completionOffset); | 2171 expect(replacementOffset, completionOffset); |
| 2172 expect(replacementLength, 0); | 2172 expect(replacementLength, 0); |
| 2173 assertSuggestLocalVariable('a', 'List'); | 2173 assertNotSuggested('a'); |
| 2174 assertNotSuggested('Object'); | 2174 assertNotSuggested('Object'); |
| 2175 assertNotSuggested('int'); | 2175 assertNotSuggested('int'); |
| 2176 } | 2176 } |
| 2177 | 2177 |
| 2178 test_ForStatement_updaters() async { | 2178 test_ForStatement_updaters() async { |
| 2179 // SimpleIdentifier ForStatement | 2179 // SimpleIdentifier ForStatement |
| 2180 addTestSource('main() {for (int index = 0; index < 10; i^)}'); | 2180 addTestSource('main() {for (int index = 0; index < 10; i^)}'); |
| 2181 await computeSuggestions(); | 2181 await computeSuggestions(); |
| 2182 | 2182 |
| 2183 expect(replacementOffset, completionOffset - 1); | 2183 expect(replacementOffset, completionOffset - 1); |
| (...skipping 2213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4397 relevance: DART_RELEVANCE_LOCAL_FUNCTION); | 4397 relevance: DART_RELEVANCE_LOCAL_FUNCTION); |
| 4398 assertNotSuggested('bar2'); | 4398 assertNotSuggested('bar2'); |
| 4399 assertNotSuggested('_B'); | 4399 assertNotSuggested('_B'); |
| 4400 assertSuggestClass('Y'); | 4400 assertSuggestClass('Y'); |
| 4401 assertSuggestClass('C'); | 4401 assertSuggestClass('C'); |
| 4402 assertSuggestLocalVariable('f', null); | 4402 assertSuggestLocalVariable('f', null); |
| 4403 assertNotSuggested('x'); | 4403 assertNotSuggested('x'); |
| 4404 assertNotSuggested('e'); | 4404 assertNotSuggested('e'); |
| 4405 } | 4405 } |
| 4406 } | 4406 } |
| OLD | NEW |