| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |