Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart

Issue 2728653004: Default arg support continued (flutter-intellij#553). (Closed)
Patch Set: Review tweaks. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.util; 5 library test.services.completion.dart.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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 expect(element.name, equals(name)); 194 expect(element.name, equals(name));
195 expect(element.parameters, isNull); 195 expect(element.parameters, isNull);
196 expect(element.returnType, isNull); 196 expect(element.returnType, isNull);
197 assertHasNoParameterInfo(cs); 197 assertHasNoParameterInfo(cs);
198 return cs; 198 return cs;
199 } 199 }
200 200
201 CompletionSuggestion assertSuggestConstructor(String name, 201 CompletionSuggestion assertSuggestConstructor(String name,
202 {int relevance: DART_RELEVANCE_DEFAULT, 202 {int relevance: DART_RELEVANCE_DEFAULT,
203 String importUri, 203 String importUri,
204 int elemOffset}) { 204 int elemOffset,
205 String defaultArgListString}) {
205 CompletionSuggestion cs = assertSuggest(name, 206 CompletionSuggestion cs = assertSuggest(name,
206 relevance: relevance, importUri: importUri, elemOffset: elemOffset); 207 relevance: relevance, importUri: importUri, elemOffset: elemOffset,
208 defaultArgListString: defaultArgListString);
207 protocol.Element element = cs.element; 209 protocol.Element element = cs.element;
208 expect(element, isNotNull); 210 expect(element, isNotNull);
209 expect(element.kind, equals(protocol.ElementKind.CONSTRUCTOR)); 211 expect(element.kind, equals(protocol.ElementKind.CONSTRUCTOR));
210 int index = name.indexOf('.'); 212 int index = name.indexOf('.');
211 expect(element.name, index >= 0 ? name.substring(index + 1) : ''); 213 expect(element.name, index >= 0 ? name.substring(index + 1) : '');
212 return cs; 214 return cs;
213 } 215 }
214 216
215 CompletionSuggestion assertSuggestEnum(String completion, 217 CompletionSuggestion assertSuggestEnum(String completion,
216 {bool isDeprecated: false}) { 218 {bool isDeprecated: false}) {
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 589
588 @override 590 @override
589 void setUp() { 591 void setUp() {
590 super.setUp(); 592 super.setUp();
591 index = createMemoryIndex(); 593 index = createMemoryIndex();
592 searchEngine = 594 searchEngine =
593 new SearchEngineImpl(index, (_) => new AstProviderForContext(context)); 595 new SearchEngineImpl(index, (_) => new AstProviderForContext(context));
594 contributor = createContributor(); 596 contributor = createContributor();
595 } 597 }
596 } 598 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698