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

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

Issue 2669863003: Handle invalid URIs in summaries. (Closed)
Patch Set: Remove uri.dart, tweak for summarize_ast_test. 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.resynthesize_ast_test; 5 library analyzer.test.src.summary.resynthesize_ast_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/element/element.dart'; 8 import 'package:analyzer/dart/element/element.dart';
9 import 'package:analyzer/error/error.dart'; 9 import 'package:analyzer/error/error.dart';
10 import 'package:analyzer/src/dart/element/element.dart'; 10 import 'package:analyzer/src/dart/element/element.dart';
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 }); 851 });
852 } 852 }
853 853
854 void _reset() { 854 void _reset() {
855 serializedSources.clear(); 855 serializedSources.clear();
856 bundleAssembler = new PackageBundleAssembler(); 856 bundleAssembler = new PackageBundleAssembler();
857 uriToUnit.clear(); 857 uriToUnit.clear();
858 } 858 }
859 859
860 void _serializeLibrary(Source librarySource) { 860 void _serializeLibrary(Source librarySource) {
861 if (librarySource.isInSystemLibrary) { 861 if (librarySource == null || librarySource.isInSystemLibrary) {
862 return; 862 return;
863 } 863 }
864 if (!serializedSources.add(librarySource)) { 864 if (!serializedSources.add(librarySource)) {
865 return; 865 return;
866 } 866 }
867 867
868 Source resolveRelativeUri(String relativeUri) { 868 Source resolveRelativeUri(String relativeUri) {
869 Source resolvedSource = 869 Source resolvedSource =
870 context.sourceFactory.resolveUri(librarySource, relativeUri); 870 context.sourceFactory.resolveUri(librarySource, relativeUri);
871 if (resolvedSource == null && !allowMissingFiles) { 871 if (resolvedSource == null && !allowMissingFiles) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 } 934 }
935 935
936 @override 936 @override
937 DartSdk createDartSdk() => AbstractContextTest.SHARED_MOCK_SDK; 937 DartSdk createDartSdk() => AbstractContextTest.SHARED_MOCK_SDK;
938 938
939 @override 939 @override
940 TestSummaryResynthesizer encodeDecodeLibrarySource(Source source) { 940 TestSummaryResynthesizer encodeDecodeLibrarySource(Source source) {
941 return _encodeLibrary(source); 941 return _encodeLibrary(source);
942 } 942 }
943 } 943 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/summary/prelinker_test.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698