| 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.dart.local; | 5 library test.services.completion.dart.local; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/protocol.dart' as protocol | 7 import 'package:analysis_server/src/protocol.dart' as protocol |
| 8 show Element, ElementKind; | 8 show Element, ElementKind; |
| 9 import 'package:analysis_server/src/protocol.dart' hide Element, ElementKind; | 9 import 'package:analysis_server/src/protocol.dart' hide Element, ElementKind; |
| 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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 | 786 |
| 787 test_overrides() { | 787 test_overrides() { |
| 788 addTestSource(''' | 788 addTestSource(''' |
| 789 class A {m() {}} | 789 class A {m() {}} |
| 790 class B extends A {m() {^}} | 790 class B extends A {m() {^}} |
| 791 '''); | 791 '''); |
| 792 expect(computeFast(), isTrue); | 792 expect(computeFast(), isTrue); |
| 793 assertSuggestMethod('m', 'B', null, relevance: DART_RELEVANCE_LOCAL_METHOD); | 793 assertSuggestMethod('m', 'B', null, relevance: DART_RELEVANCE_LOCAL_METHOD); |
| 794 } | 794 } |
| 795 | 795 |
| 796 test_prioritization_private() { |
| 797 addTestSource('main() {var ab; var _ab; _^}'); |
| 798 expect(computeFast(), isTrue); |
| 799 assertSuggestLocalVariable('ab', null); |
| 800 assertSuggestLocalVariable('_ab', null); |
| 801 } |
| 802 |
| 803 test_prioritization_public() { |
| 804 addTestSource('main() {var ab; var _ab; a^}'); |
| 805 expect(computeFast(), isTrue); |
| 806 assertSuggestLocalVariable('ab', null); |
| 807 assertSuggestLocalVariable('_ab', null, relevance: DART_RELEVANCE_DEFAULT); |
| 808 } |
| 809 |
| 796 test_shadowed_name() { | 810 test_shadowed_name() { |
| 797 addTestSource('var a; class A { var a; m() { ^ } }'); | 811 addTestSource('var a; class A { var a; m() { ^ } }'); |
| 798 expect(computeFast(), isTrue); | 812 expect(computeFast(), isTrue); |
| 799 assertSuggestLocalField('a', null); | 813 assertSuggestLocalField('a', null); |
| 800 } | 814 } |
| 801 } | 815 } |
| OLD | NEW |