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

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

Issue 812233003: update completion cache key to include part directives (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/dart_completion_cache.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.toplevel; 5 library test.services.completion.toplevel;
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/completion_manager.dart' ; 8 import 'package:analysis_server/src/services/completion/completion_manager.dart' ;
9 import 'package:analysis_server/src/services/completion/dart_completion_cache.da rt'; 9 import 'package:analysis_server/src/services/completion/dart_completion_cache.da rt';
10 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart'; 10 import 'package:analysis_server/src/services/completion/dart_completion_manager. dart';
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 return super.test_Block().then((_) { 135 return super.test_Block().then((_) {
136 expect( 136 expect(
137 request.cache.importKey, 137 request.cache.importKey,
138 'import "/testAB.dart";import "/testCD.dart" hide D;import "/testEEF.d art" show EE;import "/testG.dart" as g;'); 138 'import "/testAB.dart";import "/testCD.dart" hide D;import "/testEEF.d art" show EE;import "/testG.dart" as g;');
139 assertCached('A'); 139 assertCached('A');
140 assertCached('T3'); 140 assertCached('T3');
141 }); 141 });
142 } 142 }
143 143
144 @override 144 @override
145 test_partFile_TypeName() {
146 return super.test_partFile_TypeName().then((_) {
147 expect(
148 request.cache.importKey,
149 'part of libA;');
150 });
151 }
152
153 @override
154 test_partFile_TypeName2() {
155 return super.test_partFile_TypeName2().then((_) {
156 expect(
157 request.cache.importKey,
158 'library libA;import "/testB.dart";part "/testA.dart";');
159 });
160 }
161
162 @override
145 test_Block_inherited_imported() { 163 test_Block_inherited_imported() {
146 return super.test_Block_inherited_imported().then((_) { 164 return super.test_Block_inherited_imported().then((_) {
147 assertCached('E'); 165 assertCached('E');
148 assertCached('F'); 166 assertCached('F');
149 assertNotCached('e1'); 167 assertNotCached('e1');
150 assertNotCached('i2'); 168 assertNotCached('i2');
151 assertNotCached('m1'); 169 assertNotCached('m1');
152 }); 170 });
153 } 171 }
154 172
(...skipping 30 matching lines...) Expand all
185 (computer as ImportedComputer).shouldWaitForLowPrioritySuggestions = false; 203 (computer as ImportedComputer).shouldWaitForLowPrioritySuggestions = false;
186 computeFast(); 204 computeFast();
187 return computeFull((bool result) { 205 return computeFull((bool result) {
188 assertSuggestImportedClass('C'); 206 assertSuggestImportedClass('C');
189 // Assert computer does not wait for or include low priority results 207 // Assert computer does not wait for or include low priority results
190 // from non-imported libraries unless instructed to do so. 208 // from non-imported libraries unless instructed to do so.
191 assertNotSuggested('H'); 209 assertNotSuggested('H');
192 }); 210 });
193 } 211 }
194 } 212 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/services/completion/dart_completion_cache.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698