Files
sdk/pkg/analyzer/test/embedder_tests.dart
T
Ahmed Ashour f1ded6af56 Remove import dart:core
Fixes #47092

TEST=existing

Change-Id: I3c5c0a1ec5e0426642a5dc70aa9a0391a143ed93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212298
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-09-06 11:57:40 +00:00

39 lines
1.3 KiB
Dart

// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/file_system/memory_file_system.dart';
import 'resource_utils.dart';
abstract class EmbedderRelatedTest {
final String emptyPath = '/home/.pub-cache/empty';
final String foxPath = '/home/.pub-cache/fox';
final String foxLib = '/home/.pub-cache/fox/lib';
late final TestPathTranslator pathTranslator;
late final ResourceProvider resourceProvider;
buildResourceProvider() {
MemoryResourceProvider rawProvider = MemoryResourceProvider();
resourceProvider = TestResourceProvider(rawProvider);
pathTranslator = TestPathTranslator(rawProvider)
..newFolder('/home/.pub-cache/empty')
..newFolder('/home/.pub-cache/fox/lib')
..newFile('/home/.pub-cache/fox/lib/_embedder.yaml', r'''
embedded_libs:
"dart:deep": "deep/directory/file.dart"
"dart:core" : "core/core.dart"
"dart:fox": "slippy.dart"
"dart:bear": "grizzly.dart"
"dart:relative": "../relative.dart"
"fart:loudly": "nomatter.dart"
''');
}
void setUp() {
buildResourceProvider();
}
}