| 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 | 9 import 'package:analysis_server/src/protocol.dart' as protocol |
| 10 show Element, ElementKind; | 10 show Element, ElementKind; |
| (...skipping 3184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3195 addTestSource(''' | 3195 addTestSource(''' |
| 3196 import "/testB.dart"; | 3196 import "/testB.dart"; |
| 3197 class Y {Y.c(); Y._d(); z() {}} | 3197 class Y {Y.c(); Y._d(); z() {}} |
| 3198 main() {var ^}'''); | 3198 main() {var ^}'''); |
| 3199 computeFast(); | 3199 computeFast(); |
| 3200 return computeFull((bool result) { | 3200 return computeFull((bool result) { |
| 3201 assertNoSuggestions(); | 3201 assertNoSuggestions(); |
| 3202 }); | 3202 }); |
| 3203 } | 3203 } |
| 3204 | 3204 |
| 3205 test_VariableDeclarationList_final() { |
| 3206 // VariableDeclarationList VariableDeclarationStatement Block |
| 3207 addTestSource('main() {final ^} class C { }'); |
| 3208 computeFast(); |
| 3209 return computeFull((bool result) { |
| 3210 assertSuggestImportedClass('Object'); |
| 3211 assertSuggestLocalClass('C'); |
| 3212 assertNotSuggested('=='); |
| 3213 }); |
| 3214 } |
| 3215 |
| 3205 test_VariableDeclarationStatement_RHS() { | 3216 test_VariableDeclarationStatement_RHS() { |
| 3206 // SimpleIdentifier VariableDeclaration VariableDeclarationList | 3217 // SimpleIdentifier VariableDeclaration VariableDeclarationList |
| 3207 // VariableDeclarationStatement | 3218 // VariableDeclarationStatement |
| 3208 addSource('/testB.dart', ''' | 3219 addSource('/testB.dart', ''' |
| 3209 lib B; | 3220 lib B; |
| 3210 foo() { } | 3221 foo() { } |
| 3211 class _B { } | 3222 class _B { } |
| 3212 class X {X.c(); X._d(); z() {}}'''); | 3223 class X {X.c(); X._d(); z() {}}'''); |
| 3213 addTestSource(''' | 3224 addTestSource(''' |
| 3214 import "/testB.dart"; | 3225 import "/testB.dart"; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3254 assertNotSuggested('bar2'); | 3265 assertNotSuggested('bar2'); |
| 3255 assertNotSuggested('_B'); | 3266 assertNotSuggested('_B'); |
| 3256 assertSuggestLocalClass('Y'); | 3267 assertSuggestLocalClass('Y'); |
| 3257 assertSuggestLocalClass('C'); | 3268 assertSuggestLocalClass('C'); |
| 3258 assertSuggestLocalVariable('f', null); | 3269 assertSuggestLocalVariable('f', null); |
| 3259 assertNotSuggested('x'); | 3270 assertNotSuggested('x'); |
| 3260 assertNotSuggested('e'); | 3271 assertNotSuggested('e'); |
| 3261 }); | 3272 }); |
| 3262 } | 3273 } |
| 3263 } | 3274 } |
| OLD | NEW |