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

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

Issue 811933007: insert parameters when completing imported functions and inherited methods (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 11 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 | Annotate | Revision Log
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.invocation; 5 library test.services.completion.invocation;
6 6
7 7
8 import 'package:analysis_server/src/protocol.dart'; 8 import 'package:analysis_server/src/protocol.dart';
9 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart'; 9 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart';
10 import 'package:analysis_server/src/services/completion/invocation_computer.dart '; 10 import 'package:analysis_server/src/services/completion/invocation_computer.dart ';
11 import 'package:unittest/unittest.dart'; 11 import 'package:unittest/unittest.dart';
12 12
13 import '../../reflective_tests.dart'; 13 import '../../reflective_tests.dart';
14 import 'completion_test_util.dart'; 14 import 'completion_test_util.dart';
15 15
16 main() { 16 main() {
17 groupSep = ' | '; 17 groupSep = ' | ';
18 runReflectiveTests(InvocationComputerTest); 18 runReflectiveTests(InvocationComputerTest);
19 } 19 }
20 20
21 @ReflectiveTestCase() 21 @ReflectiveTestCase()
22 class InvocationComputerTest extends AbstractSelectorSuggestionTest { 22 class InvocationComputerTest extends AbstractSelectorSuggestionTest {
23 23
24 void assertHasNoParameterInfo(CompletionSuggestion suggestion) {
25 expect(suggestion.parameterNames, isNull);
26 expect(suggestion.parameterTypes, isNull);
27 expect(suggestion.requiredParameterCount, isNull);
28 expect(suggestion.hasNamedParameters, isNull);
29 }
30
31 @override 24 @override
32 CompletionSuggestion assertSuggestInvocationField(String name, String type, 25 CompletionSuggestion assertSuggestInvocationField(String name, String type,
33 {int relevance: COMPLETION_RELEVANCE_DEFAULT, bool isDeprecated: false}) { 26 {int relevance: COMPLETION_RELEVANCE_DEFAULT, bool isDeprecated: false}) {
34 return assertSuggestField( 27 return assertSuggestField(
35 name, 28 name,
36 type, 29 type,
37 relevance: relevance, 30 relevance: relevance,
38 isDeprecated: isDeprecated); 31 isDeprecated: isDeprecated);
39 } 32 }
40 33
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 class C { 171 class C {
179 set x(int value) {}; 172 set x(int value) {};
180 } 173 }
181 void main() {int y = new C().^}'''); 174 void main() {int y = new C().^}''');
182 return computeFull((bool result) { 175 return computeFull((bool result) {
183 CompletionSuggestion suggestion = assertSuggestSetter('x'); 176 CompletionSuggestion suggestion = assertSuggestSetter('x');
184 assertHasNoParameterInfo(suggestion); 177 assertHasNoParameterInfo(suggestion);
185 }); 178 });
186 } 179 }
187 } 180 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698