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

Side by Side Diff: pkg/analyzer/test/src/summary/summarize_ast_test.dart

Issue 2700843002: Use absolute URIs for LinkedDependency.uri/parts. (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 analyzer.test.src.summary.summarize_ast_test; 5 library analyzer.test.src.summary.summarize_ast_test;
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 import 'package:analyzer/dart/ast/ast.dart'; 8 import 'package:analyzer/dart/ast/ast.dart';
9 import 'package:analyzer/dart/ast/token.dart'; 9 import 'package:analyzer/dart/ast/token.dart';
10 import 'package:analyzer/error/listener.dart'; 10 import 'package:analyzer/error/listener.dart';
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 if (linkedLibrary == null && !_allowMissingFiles) { 217 if (linkedLibrary == null && !_allowMissingFiles) {
218 Set<String> librariesAvailable = sdkLibraries.keys.toSet(); 218 Set<String> librariesAvailable = sdkLibraries.keys.toSet();
219 librariesAvailable.addAll(_dependentLinkedLibraries.keys); 219 librariesAvailable.addAll(_dependentLinkedLibraries.keys);
220 fail('Linker unexpectedly requested LinkedLibrary for "$absoluteUri".' 220 fail('Linker unexpectedly requested LinkedLibrary for "$absoluteUri".'
221 ' Libraries available: ${librariesAvailable.toList()}'); 221 ' Libraries available: ${librariesAvailable.toList()}');
222 } 222 }
223 return linkedLibrary; 223 return linkedLibrary;
224 } 224 }
225 225
226 UnlinkedUnit getUnit(String absoluteUri) { 226 UnlinkedUnit getUnit(String absoluteUri) {
227 if (absoluteUri == null) {
228 return null;
229 }
227 UnlinkedUnit unit = _uriToUnit[absoluteUri] ?? 230 UnlinkedUnit unit = _uriToUnit[absoluteUri] ??
228 SerializedMockSdk.instance.uriToUnlinkedUnit[absoluteUri] ?? 231 SerializedMockSdk.instance.uriToUnlinkedUnit[absoluteUri] ??
229 _dependentUnlinkedUnits[absoluteUri]; 232 _dependentUnlinkedUnits[absoluteUri];
230 if (unit == null && !_allowMissingFiles) { 233 if (unit == null && !_allowMissingFiles) {
231 fail('Linker unexpectedly requested unit for "$absoluteUri".'); 234 fail('Linker unexpectedly requested unit for "$absoluteUri".');
232 } 235 }
233 return unit; 236 return unit;
234 } 237 }
235 } 238 }
236 239
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 * passed to [addNamedSource]. 346 * passed to [addNamedSource].
344 */ 347 */
345 Map<String, UnlinkedUnitBuilder> uriToUnit = <String, UnlinkedUnitBuilder>{}; 348 Map<String, UnlinkedUnitBuilder> uriToUnit = <String, UnlinkedUnitBuilder>{};
346 349
347 /** 350 /**
348 * Information about summaries to be included in the link process. 351 * Information about summaries to be included in the link process.
349 */ 352 */
350 SummaryDataStore summaryDataStore = 353 SummaryDataStore summaryDataStore =
351 new SummaryDataStore([], recordDependencyInfo: true); 354 new SummaryDataStore([], recordDependencyInfo: true);
352 } 355 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698