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

Side by Side Diff: pkg/analysis_services/test/completion/completion_computer_test.dart

Issue 465843002: respect show/hide combinators when generating suggestions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address comments Created 6 years, 4 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.suggestion; 5 library test.services.completion.suggestion;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_services/completion/completion_computer.dart'; 9 import 'package:analysis_services/completion/completion_computer.dart';
10 import 'package:analysis_services/completion/completion_suggestion.dart'; 10 import 'package:analysis_services/completion/completion_suggestion.dart';
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 expect(this.fastCount, equals(1)); 193 expect(this.fastCount, equals(1));
194 expect(this.fullCount, equals(0)); 194 expect(this.fullCount, equals(0));
195 } 195 }
196 196
197 assertFull(int fullCount) { 197 assertFull(int fullCount) {
198 expect(this.fastCount, equals(1)); 198 expect(this.fastCount, equals(1));
199 expect(this.fullCount, equals(fullCount)); 199 expect(this.fullCount, equals(fullCount));
200 } 200 }
201 201
202 @override 202 @override
203 bool computeFast(CompilationUnit unit, 203 bool computeFast(CompilationUnit unit, AstNode node,
204 List<CompletionSuggestion> suggestions) { 204 List<CompletionSuggestion> suggestions) {
205 fastCount++; 205 fastCount++;
206 if (fastSuggestion != null) { 206 if (fastSuggestion != null) {
207 suggestions.add(fastSuggestion); 207 suggestions.add(fastSuggestion);
208 } 208 }
209 return fastSuggestion != null; 209 return fastSuggestion != null;
210 } 210 }
211 211
212 @override 212 @override
213 Future<bool> computeFull(CompilationUnit unit, 213 Future<bool> computeFull(CompilationUnit unit, AstNode node,
214 List<CompletionSuggestion> suggestions) { 214 List<CompletionSuggestion> suggestions) {
215 fullCount++; 215 fullCount++;
216 if (fullSuggestion != null) { 216 if (fullSuggestion != null) {
217 suggestions.add(fullSuggestion); 217 suggestions.add(fullSuggestion);
218 } 218 }
219 return new Future.value(fullSuggestion != null); 219 return new Future.value(fullSuggestion != null);
220 } 220 }
221 } 221 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698