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

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

Issue 1506623002: fix combinator contributor (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « pkg/analysis_server/test/services/completion/dart/combinator_contributor_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 // expect(param[0], equals('(')); 208 // expect(param[0], equals('('));
209 // expect(param[param.length - 1], equals(')')); 209 // expect(param[param.length - 1], equals(')'));
210 expect(element.returnType, 210 expect(element.returnType,
211 equals(returnType != null ? returnType : 'dynamic')); 211 equals(returnType != null ? returnType : 'dynamic'));
212 // TODO (danrubel) Determine why param info is missing 212 // TODO (danrubel) Determine why param info is missing
213 // assertHasParameterInfo(cs); 213 // assertHasParameterInfo(cs);
214 return cs; 214 return cs;
215 } 215 }
216 216
217 CompletionSuggestion assertSuggestTopLevelVar(String name, String returnType, 217 CompletionSuggestion assertSuggestTopLevelVar(String name, String returnType,
218 [int relevance = DART_RELEVANCE_DEFAULT, 218 {int relevance: DART_RELEVANCE_DEFAULT,
219 CompletionSuggestionKind kind = CompletionSuggestionKind.INVOCATION, 219 CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
220 String importUri]) { 220 String importUri}) {
221 CompletionSuggestion cs = assertSuggest(name, 221 CompletionSuggestion cs = assertSuggest(name,
222 csKind: kind, relevance: relevance, importUri: importUri); 222 csKind: kind, relevance: relevance, importUri: importUri);
223 expect(cs.returnType, returnType != null ? returnType : 'dynamic'); 223 expect(cs.returnType, returnType != null ? returnType : 'dynamic');
224 protocol.Element element = cs.element; 224 protocol.Element element = cs.element;
225 expect(element, isNotNull); 225 expect(element, isNotNull);
226 expect(element.kind, equals(protocol.ElementKind.TOP_LEVEL_VARIABLE)); 226 expect(element.kind, equals(protocol.ElementKind.TOP_LEVEL_VARIABLE));
227 expect(element.name, equals(name)); 227 expect(element.name, equals(name));
228 expect(element.parameters, isNull); 228 expect(element.parameters, isNull);
229 expect(element.returnType, returnType != null ? returnType : 'dynamic'); 229 expect(element.returnType, returnType != null ? returnType : 'dynamic');
230 assertHasNoParameterInfo(cs); 230 assertHasNoParameterInfo(cs);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 } 331 }
332 332
333 @override 333 @override
334 void setUp() { 334 void setUp() {
335 super.setUp(); 335 super.setUp();
336 index = createLocalMemoryIndex(); 336 index = createLocalMemoryIndex();
337 searchEngine = new SearchEngineImpl(index); 337 searchEngine = new SearchEngineImpl(index);
338 contributor = createContributor(); 338 contributor = createContributor();
339 } 339 }
340 } 340 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/services/completion/dart/combinator_contributor_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698