OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'package:analyzer_plugin/protocol/protocol_common.dart'; | 5 import 'package:analyzer_plugin/protocol/protocol_common.dart'; |
6 import 'package:analyzer_plugin/utilities/completion/completion_core.dart'; | 6 import 'package:analyzer_plugin/utilities/completion/completion_core.dart'; |
7 import 'package:analyzer_plugin/utilities/completion/inherited_reference_contrib
utor.dart'; | 7 import 'package:analyzer_plugin/utilities/completion/inherited_reference_contrib
utor.dart'; |
8 import 'package:test/test.dart'; | 8 import 'package:test/test.dart'; |
9 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 9 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
10 | 10 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 await computeSuggestions(); | 152 await computeSuggestions(); |
153 expect(replacementOffset, completionOffset); | 153 expect(replacementOffset, completionOffset); |
154 expect(replacementLength, 0); | 154 expect(replacementLength, 0); |
155 assertNotSuggested('Object'); | 155 assertNotSuggested('Object'); |
156 assertNotSuggested('B'); | 156 assertNotSuggested('B'); |
157 assertNotSuggested('a'); | 157 assertNotSuggested('a'); |
158 assertNotSuggested('b'); | 158 assertNotSuggested('b'); |
159 assertNotSuggested('foo'); | 159 assertNotSuggested('foo'); |
160 assertNotSuggested('A'); | 160 assertNotSuggested('A'); |
161 assertSuggestField('x', 'int'); | 161 assertSuggestField('x', 'int'); |
162 assertSuggestMethod('y', 'A2', 'int'); | 162 assertSuggestMethod('y', 'A1', 'int'); |
163 assertSuggestField('x1', 'int'); | 163 assertSuggestField('x1', 'int'); |
164 assertSuggestMethod('y1', 'A1', 'int'); | 164 assertSuggestMethod('y1', 'A1', 'int'); |
165 assertSuggestField('x2', 'int'); | 165 assertSuggestField('x2', 'int'); |
166 assertSuggestMethod('y2', 'A2', 'int'); | 166 assertSuggestMethod('y2', 'A2', 'int'); |
167 } | 167 } |
168 | 168 |
169 test_method_in_class() async { | 169 test_method_in_class() async { |
170 addTestSource(''' | 170 addTestSource(''' |
171 class A { | 171 class A { |
172 void m(x, int y) {} | 172 void m(x, int y) {} |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 assertNotSuggested('foo'); | 598 assertNotSuggested('foo'); |
599 assertNotSuggested('A'); | 599 assertNotSuggested('A'); |
600 assertNotSuggested('x'); | 600 assertNotSuggested('x'); |
601 assertNotSuggested('y'); | 601 assertNotSuggested('y'); |
602 assertNotSuggested('x1'); | 602 assertNotSuggested('x1'); |
603 assertNotSuggested('y1'); | 603 assertNotSuggested('y1'); |
604 assertNotSuggested('x2'); | 604 assertNotSuggested('x2'); |
605 assertNotSuggested('y2'); | 605 assertNotSuggested('y2'); |
606 } | 606 } |
607 } | 607 } |
OLD | NEW |