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

Unified Diff: pkg/analyzer/lib/src/summary/package_bundle_reader.dart

Issue 2186143002: Tests for several SummaryDataStore and ResynthesizerResultProvider features. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Actually add the new test file. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/package_bundle_reader_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/package_bundle_reader.dart
diff --git a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
index 5416eb8ded6c9e8e17a9c5b1c2507498f33cbca1..062ce82466032020f5e85ac5978e60a079f4c9d2 100644
--- a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
+++ b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
@@ -186,7 +186,7 @@ abstract class ResynthesizerResultProvider extends ResultProvider {
return false;
} else if (result == CONTAINING_LIBRARIES) {
List<String> libraryUriStrings =
- _dataStore._getContainingLibraryUris(uriString);
+ _dataStore.getContainingLibraryUris(uriString);
if (libraryUriStrings != null) {
List<Source> librarySources = libraryUriStrings
.map((libraryUriString) =>
@@ -308,18 +308,11 @@ class SummaryDataStore {
}
}
- void _fillMaps(String path) {
- io.File file = new io.File(path);
- List<int> buffer = file.readAsBytesSync();
- PackageBundle bundle = new PackageBundle.fromBuffer(buffer);
- addBundle(path, bundle);
- }
-
/**
* Return a list of absolute URIs of the libraries that contain the unit with
* the given [unitUriString], or `null` if no such library is in the store.
*/
- List<String> _getContainingLibraryUris(String unitUriString) {
+ List<String> getContainingLibraryUris(String unitUriString) {
// The unit is the defining unit of a library.
if (linkedMap.containsKey(unitUriString)) {
return <String>[unitUriString];
@@ -339,6 +332,13 @@ class SummaryDataStore {
});
return libraryUriStrings.isNotEmpty ? libraryUriStrings : null;
}
+
+ void _fillMaps(String path) {
+ io.File file = new io.File(path);
+ List<int> buffer = file.readAsBytesSync();
+ PackageBundle bundle = new PackageBundle.fromBuffer(buffer);
+ addBundle(path, bundle);
+ }
}
/**
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/package_bundle_reader_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698