mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 08:44:27 +00:00
analyzer: Remove unused addExtensions method from sdk
Change-Id: I3b78827ad939c55f87a294cc225440ef86b610ab Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220128 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Samuel Rawlins <srawlins@google.com>
This commit is contained in:
parent
ffcc3e667e
commit
2ee6eb28d0
2 changed files with 0 additions and 22 deletions
|
@ -46,17 +46,6 @@ abstract class AbstractDartSdk implements DartSdk {
|
|||
@override
|
||||
List<String> get uris => libraryMap.uris;
|
||||
|
||||
/// Add the extensions from one or more sdk extension files to this sdk. The
|
||||
/// [extensions] should be a table mapping the names of extensions to the
|
||||
/// paths where those extensions can be found.
|
||||
void addExtensions(Map<String, String> extensions) {
|
||||
extensions.forEach((String uri, String path) {
|
||||
SdkLibraryImpl library = SdkLibraryImpl(uri);
|
||||
library.path = path;
|
||||
libraryMap.setLibrary(uri, library);
|
||||
});
|
||||
}
|
||||
|
||||
/// Return info for debugging https://github.com/dart-lang/sdk/issues/35226.
|
||||
Map<String, Object> debugInfo() {
|
||||
return <String, Object>{
|
||||
|
|
|
@ -122,17 +122,6 @@ class EmbedderSdkTest extends EmbedderRelatedTest {
|
|||
|
||||
@reflectiveTest
|
||||
class FolderBasedDartSdkTest with ResourceProviderMixin {
|
||||
void test_addExtensions() {
|
||||
FolderBasedDartSdk sdk = _createDartSdk();
|
||||
String uri = 'dart:my.internal';
|
||||
sdk.addExtensions({uri: '/Users/user/dart/my.dart'});
|
||||
expect(sdk.mapDartUri(uri), isNotNull);
|
||||
// The `shortName` property must include the `dart:` prefix.
|
||||
expect(sdk.sdkLibraries, contains(predicate((SdkLibrary library) {
|
||||
return library.shortName == uri;
|
||||
})));
|
||||
}
|
||||
|
||||
void test_creation() {
|
||||
FolderBasedDartSdk sdk = _createDartSdk();
|
||||
expect(sdk, isNotNull);
|
||||
|
|
Loading…
Reference in a new issue