Index: pkg/front_end/test/src/incremental/mock_sdk.dart |
diff --git a/pkg/front_end/test/src/incremental/mock_sdk.dart b/pkg/front_end/test/src/incremental/mock_sdk.dart |
index b4b8d81c295c10f08567c484bdf0d8201718b4c3..b005e2606c37c7b1676149e5e7c9c04d014257c7 100644 |
--- a/pkg/front_end/test/src/incremental/mock_sdk.dart |
+++ b/pkg/front_end/test/src/incremental/mock_sdk.dart |
@@ -3,21 +3,18 @@ |
// BSD-style license that can be found in the LICENSE file. |
import 'package:front_end/memory_file_system.dart'; |
-import 'package:front_end/src/base/libraries_specification.dart'; |
/// Create SDK libraries which are used by Fasta to perform kernel generation. |
-/// The root of the SDK is `file:///sdk`, it will contain a libraries |
-/// specification file at `lib/libraries.json`. |
-/// |
-/// Returns the [TargetLibrariesSpecification] whose contents are in |
-/// libraries.json. |
-TargetLibrariesSpecification createSdkFiles(MemoryFileSystem fileSystem) { |
- Map<String, LibraryInfo> dartLibraries = {}; |
+/// Return the mapping from the simple names of these library to the URIs |
+/// in the given [fileSystem]. The root of the SDK is `file:///sdk`. |
+Map<String, Uri> createSdkFiles(MemoryFileSystem fileSystem) { |
+ Map<String, Uri> dartLibraries = {}; |
+ |
void addSdkLibrary(String name, String contents) { |
String path = '$name/$name.dart'; |
Uri uri = Uri.parse('file:///sdk/lib/$path'); |
fileSystem.entityForUri(uri).writeAsStringSync(contents); |
- dartLibraries[name] = new LibraryInfo(name, uri, const []); |
+ dartLibraries[name] = uri; |
} |
addSdkLibrary('core', r''' |
@@ -268,10 +265,5 @@ class ExternalName { |
'''); |
addSdkLibrary('_vmservice', 'library dart._vmservice;'); |
- var targetSpec = new TargetLibrariesSpecification('vm', dartLibraries); |
- var spec = new LibrariesSpecification({'vm': targetSpec}); |
- |
- Uri uri = Uri.parse('file:///sdk/lib/libraries.json'); |
- fileSystem.entityForUri(uri).writeAsStringSync(spec.toJsonString(uri)); |
- return targetSpec; |
+ return dartLibraries; |
} |