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/plugin/protocol/protocol.dart' as protocol | 9 import 'package:analysis_server/plugin/protocol/protocol.dart' as protocol |
10 show Element, ElementKind; | 10 show Element, ElementKind; |
(...skipping 3842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3853 addTestSource(''' | 3853 addTestSource(''' |
3854 import "/testB.dart"; | 3854 import "/testB.dart"; |
3855 class A extends B { | 3855 class A extends B { |
3856 static const String scA = 'foo'; | 3856 static const String scA = 'foo'; |
3857 w() { }} | 3857 w() { }} |
3858 main() {A.^}'''); | 3858 main() {A.^}'''); |
3859 computeFast(); | 3859 computeFast(); |
3860 return computeFull((bool result) { | 3860 return computeFull((bool result) { |
3861 expect(request.replacementOffset, completionOffset); | 3861 expect(request.replacementOffset, completionOffset); |
3862 expect(request.replacementLength, 0); | 3862 expect(request.replacementLength, 0); |
3863 assertSuggestInvocationField('scA', 'String'); | 3863 // Suggested by StaticMemberContributor |
3864 assertSuggestInvocationField('scB', 'int'); | 3864 assertNotSuggested('scA'); |
3865 assertSuggestInvocationField('scI', null); | 3865 assertNotSuggested('scB'); |
| 3866 assertNotSuggested('scI'); |
3866 assertNotSuggested('b'); | 3867 assertNotSuggested('b'); |
3867 assertNotSuggested('_c'); | 3868 assertNotSuggested('_c'); |
3868 assertNotSuggested('d'); | 3869 assertNotSuggested('d'); |
3869 assertNotSuggested('_e'); | 3870 assertNotSuggested('_e'); |
3870 assertNotSuggested('f'); | 3871 assertNotSuggested('f'); |
3871 assertNotSuggested('_g'); | 3872 assertNotSuggested('_g'); |
3872 assertNotSuggested('s1'); | 3873 assertNotSuggested('s1'); |
3873 assertNotSuggested('_s2'); | 3874 assertNotSuggested('_s2'); |
3874 assertNotSuggested('m'); | 3875 assertNotSuggested('m'); |
3875 assertNotSuggested('_n'); | 3876 assertNotSuggested('_n'); |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4695 assertNotSuggested('bar2'); | 4696 assertNotSuggested('bar2'); |
4696 assertNotSuggested('_B'); | 4697 assertNotSuggested('_B'); |
4697 assertSuggestLocalClass('Y'); | 4698 assertSuggestLocalClass('Y'); |
4698 assertSuggestLocalClass('C'); | 4699 assertSuggestLocalClass('C'); |
4699 assertSuggestLocalVariable('f', null); | 4700 assertSuggestLocalVariable('f', null); |
4700 assertNotSuggested('x'); | 4701 assertNotSuggested('x'); |
4701 assertNotSuggested('e'); | 4702 assertNotSuggested('e'); |
4702 }); | 4703 }); |
4703 } | 4704 } |
4704 } | 4705 } |
OLD | NEW |