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

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

Issue 904603004: rename completion constants and cleanup comment (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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_server/src/protocol.dart'; 9 import 'package:analysis_server/src/protocol.dart';
10 import 'package:analysis_server/src/services/completion/completion_manager.dart' ; 10 import 'package:analysis_server/src/services/completion/completion_manager.dart' ;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 @override 61 @override
62 void setUp() { 62 void setUp() {
63 super.setUp(); 63 super.setUp();
64 index = createLocalMemoryIndex(); 64 index = createLocalMemoryIndex();
65 searchEngine = new SearchEngineImpl(index); 65 searchEngine = new SearchEngineImpl(index);
66 source = addSource('/does/not/exist.dart', ''); 66 source = addSource('/does/not/exist.dart', '');
67 perf = new CompletionPerformance(); 67 perf = new CompletionPerformance();
68 manager = new DartCompletionManager.create(context, searchEngine, source); 68 manager = new DartCompletionManager.create(context, searchEngine, source);
69 suggestion1 = new CompletionSuggestion( 69 suggestion1 = new CompletionSuggestion(
70 CompletionSuggestionKind.INVOCATION, 70 CompletionSuggestionKind.INVOCATION,
71 COMPLETION_RELEVANCE_DEFAULT, 71 DART_RELEVANCE_DEFAULT,
72 "suggestion1", 72 "suggestion1",
73 1, 73 1,
74 1, 74 1,
75 false, 75 false,
76 false); 76 false);
77 suggestion2 = new CompletionSuggestion( 77 suggestion2 = new CompletionSuggestion(
78 CompletionSuggestionKind.IDENTIFIER, 78 CompletionSuggestionKind.IDENTIFIER,
79 COMPLETION_RELEVANCE_DEFAULT, 79 DART_RELEVANCE_DEFAULT,
80 "suggestion2", 80 "suggestion2",
81 2, 81 2,
82 2, 82 2,
83 false, 83 false,
84 false); 84 false);
85 new Future(_performAnalysis); 85 new Future(_performAnalysis);
86 } 86 }
87 87
88 @override 88 @override
89 void tearDown() { 89 void tearDown() {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 @override 202 @override
203 Future<bool> computeFull(DartCompletionRequest request) { 203 Future<bool> computeFull(DartCompletionRequest request) {
204 this.request = request; 204 this.request = request;
205 fullCount++; 205 fullCount++;
206 if (fullSuggestion != null) { 206 if (fullSuggestion != null) {
207 request.suggestions.add(fullSuggestion); 207 request.suggestions.add(fullSuggestion);
208 } 208 }
209 return new Future.value(fullSuggestion != null); 209 return new Future.value(fullSuggestion != null);
210 } 210 }
211 } 211 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698