@@ -71,15 +71,13 @@ abstract class AbstractCompletionDriverTest with ResourceProviderMixin {
7171 }
7272
7373 void assertSuggestion ({
74- bool allowMultiple = false ,
7574 required String completion,
7675 ElementKind ? element,
7776 CompletionSuggestionKind ? kind,
7877 String ? file,
7978 }) {
8079 expect (
8180 suggestionWith (
82- allowMultiple: allowMultiple,
8381 completion: completion,
8482 element: element,
8583 kind: kind,
@@ -184,17 +182,14 @@ project:${toUri('$projectPath/lib')}
184182 completion: completion, element: element, kind: kind, file: file));
185183
186184 CompletionSuggestion suggestionWith ({
187- bool allowMultiple = false ,
188185 required String completion,
189186 ElementKind ? element,
190187 CompletionSuggestionKind ? kind,
191188 String ? file,
192189 }) {
193190 final matches = suggestionsWith (
194191 completion: completion, element: element, kind: kind, file: file);
195- if (! allowMultiple) {
196- expect (matches, hasLength (1 ));
197- }
192+ expect (matches, hasLength (1 ));
198193 return matches.first;
199194 }
200195
@@ -269,10 +264,7 @@ void f() {
269264}
270265''' );
271266
272- // TODO(brianwilkerson) There should be a single suggestion here after we
273- // figure out how to stop the duplication.
274267 assertSuggestion (
275- allowMultiple: true ,
276268 completion: 'A' ,
277269 element: ElementKind .CONSTRUCTOR ,
278270 kind: CompletionSuggestionKind .INVOCATION );
@@ -296,11 +288,7 @@ void f() {
296288 ^
297289}
298290''' );
299-
300- // TODO(brianwilkerson) There should be a single suggestion here after we
301- // figure out how to stop the duplication.
302291 assertSuggestion (
303- allowMultiple: true ,
304292 completion: 'E.e' ,
305293 element: ElementKind .ENUM_CONSTANT ,
306294 kind: CompletionSuggestionKind .INVOCATION );
@@ -325,10 +313,7 @@ void f() {
325313}
326314''' );
327315
328- // TODO(brianwilkerson) There should be a single suggestion here after we
329- // figure out how to stop the duplication.
330316 assertSuggestion (
331- allowMultiple: true ,
332317 completion: 'A.a' ,
333318 element: ElementKind .CONSTRUCTOR ,
334319 kind: CompletionSuggestionKind .INVOCATION );
@@ -656,15 +641,13 @@ void f() {
656641}
657642''' );
658643
659- // TODO(brianwilkerson) There should be a single suggestion here after we
660- // figure out how to stop the duplication.
661644 expect (
662645 suggestionsWith (
663646 completion: 'Future.value' ,
664647 file: '/sdk/lib/async/async.dart' ,
665648 element: ElementKind .CONSTRUCTOR ,
666649 kind: CompletionSuggestionKind .INVOCATION ),
667- hasLength (2 ));
650+ hasLength (1 ));
668651 }
669652
670653 Future <void > test_sdk_lib_suggestions () async {
0 commit comments