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

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

Issue 977223003: When target requires a function, propose a function reference, not an invocation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge and remove unnecessary statement Created 5 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 | 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.dart.combinator; 5 library test.services.completion.dart.combinator;
6 6
7 import 'package:analysis_server/src/protocol.dart'; 7 import 'package:analysis_server/src/protocol.dart';
8 import 'package:analysis_server/src/services/completion/combinator_computer.dart '; 8 import 'package:analysis_server/src/services/completion/combinator_computer.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:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 relevance: DART_RELEVANCE_DEFAULT, 63 relevance: DART_RELEVANCE_DEFAULT,
64 kind: CompletionSuggestionKind.IDENTIFIER); 64 kind: CompletionSuggestionKind.IDENTIFIER);
65 assertSuggestClass('B', 65 assertSuggestClass('B',
66 relevance: DART_RELEVANCE_DEFAULT, 66 relevance: DART_RELEVANCE_DEFAULT,
67 kind: CompletionSuggestionKind.IDENTIFIER); 67 kind: CompletionSuggestionKind.IDENTIFIER);
68 assertSuggestClass('PB', 68 assertSuggestClass('PB',
69 relevance: DART_RELEVANCE_DEFAULT, 69 relevance: DART_RELEVANCE_DEFAULT,
70 kind: CompletionSuggestionKind.IDENTIFIER); 70 kind: CompletionSuggestionKind.IDENTIFIER);
71 assertSuggestTopLevelVar('T1', null, 71 assertSuggestTopLevelVar('T1', null,
72 DART_RELEVANCE_DEFAULT, CompletionSuggestionKind.IDENTIFIER); 72 DART_RELEVANCE_DEFAULT, CompletionSuggestionKind.IDENTIFIER);
73 assertSuggestFunction('F1', 'PB', false, 73 assertSuggestFunction('F1', 'PB',
74 DART_RELEVANCE_DEFAULT, CompletionSuggestionKind.IDENTIFIER); 74 kind: CompletionSuggestionKind.IDENTIFIER);
75 assertNotSuggested('C'); 75 assertNotSuggested('C');
76 assertNotSuggested('D'); 76 assertNotSuggested('D');
77 assertNotSuggested('X'); 77 assertNotSuggested('X');
78 assertNotSuggested('Object'); 78 assertNotSuggested('Object');
79 }); 79 });
80 } 80 }
81 81
82 test_Combinator_show() { 82 test_Combinator_show() {
83 // SimpleIdentifier HideCombinator ImportDirective 83 // SimpleIdentifier HideCombinator ImportDirective
84 addSource('/testAB.dart', ''' 84 addSource('/testAB.dart', '''
(...skipping 21 matching lines...) Expand all
106 relevance: DART_RELEVANCE_DEFAULT, 106 relevance: DART_RELEVANCE_DEFAULT,
107 kind: CompletionSuggestionKind.IDENTIFIER); 107 kind: CompletionSuggestionKind.IDENTIFIER);
108 assertSuggestClass('B', 108 assertSuggestClass('B',
109 relevance: DART_RELEVANCE_DEFAULT, 109 relevance: DART_RELEVANCE_DEFAULT,
110 kind: CompletionSuggestionKind.IDENTIFIER); 110 kind: CompletionSuggestionKind.IDENTIFIER);
111 assertSuggestClass('PB', 111 assertSuggestClass('PB',
112 relevance: DART_RELEVANCE_DEFAULT, 112 relevance: DART_RELEVANCE_DEFAULT,
113 kind: CompletionSuggestionKind.IDENTIFIER); 113 kind: CompletionSuggestionKind.IDENTIFIER);
114 assertSuggestTopLevelVar('T1', null, 114 assertSuggestTopLevelVar('T1', null,
115 DART_RELEVANCE_DEFAULT, CompletionSuggestionKind.IDENTIFIER); 115 DART_RELEVANCE_DEFAULT, CompletionSuggestionKind.IDENTIFIER);
116 assertSuggestFunction('F1', 'PB', false, 116 assertSuggestFunction('F1', 'PB',
117 DART_RELEVANCE_DEFAULT, CompletionSuggestionKind.IDENTIFIER); 117 kind: CompletionSuggestionKind.IDENTIFIER);
118 assertSuggestClass('Clz', 118 assertSuggestClass('Clz',
119 relevance: DART_RELEVANCE_DEFAULT, 119 relevance: DART_RELEVANCE_DEFAULT,
120 kind: CompletionSuggestionKind.IDENTIFIER); 120 kind: CompletionSuggestionKind.IDENTIFIER);
121 assertSuggestFunctionTypeAlias('F2', null, 121 assertSuggestFunctionTypeAlias('F2', null,
122 false, DART_RELEVANCE_DEFAULT, CompletionSuggestionKind.IDENTIFIER); 122 false, DART_RELEVANCE_DEFAULT, CompletionSuggestionKind.IDENTIFIER);
123 assertNotSuggested('C'); 123 assertNotSuggested('C');
124 assertNotSuggested('D'); 124 assertNotSuggested('D');
125 assertNotSuggested('X'); 125 assertNotSuggested('X');
126 assertNotSuggested('Object'); 126 assertNotSuggested('Object');
127 }); 127 });
128 } 128 }
129 } 129 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698