| Index: pkg/front_end/test/src/base/processed_options_test.dart
|
| diff --git a/pkg/front_end/test/src/base/processed_options_test.dart b/pkg/front_end/test/src/base/processed_options_test.dart
|
| index ff34028afb3a28f5e4016854996fbbc401cbcb11..e12b88c71371863559d82843c71ff8c852d4202e 100644
|
| --- a/pkg/front_end/test/src/base/processed_options_test.dart
|
| +++ b/pkg/front_end/test/src/base/processed_options_test.dart
|
| @@ -17,7 +17,7 @@ main() {
|
|
|
| @reflectiveTest
|
| class ProcessedOptionsTest {
|
| - final fileSystem = new MemoryFileSystem(pathos.posix, '/');
|
| + final fileSystem = new MemoryFileSystem(pathos.posix, Uri.parse('file:///'));
|
|
|
| test_compileSdk_false() {
|
| for (var value in [false, true]) {
|
| @@ -37,14 +37,16 @@ class ProcessedOptionsTest {
|
|
|
| test_getUriResolver_explicitPackagesFile() async {
|
| // This .packages file should be ignored.
|
| - fileSystem.entityForPath('/.packages').writeAsStringSync('foo:bar\n');
|
| + fileSystem
|
| + .entityForUri(Uri.parse('file:///.packages'))
|
| + .writeAsStringSync('foo:bar\n');
|
| // This one should be used.
|
| fileSystem
|
| - .entityForPath('/explicit.packages')
|
| + .entityForUri(Uri.parse('file:///explicit.packages'))
|
| .writeAsStringSync('foo:baz\n');
|
| var raw = new CompilerOptions()
|
| ..fileSystem = fileSystem
|
| - ..packagesFilePath = '/explicit.packages';
|
| + ..packagesFilePath = Uri.parse('file:///explicit.packages');
|
| var processed = new ProcessedOptions(raw);
|
| var uriResolver = await processed.getUriResolver();
|
| expect(uriResolver.packages, {'foo': Uri.parse('file:///baz/')});
|
| @@ -53,14 +55,16 @@ class ProcessedOptionsTest {
|
|
|
| test_getUriResolver_explicitPackagesFile_withBaseLocation() async {
|
| // This .packages file should be ignored.
|
| - fileSystem.entityForPath('/.packages').writeAsStringSync('foo:bar\n');
|
| + fileSystem
|
| + .entityForUri(Uri.parse('file:///.packages'))
|
| + .writeAsStringSync('foo:bar\n');
|
| // This one should be used.
|
| fileSystem
|
| - .entityForPath('/base/location/explicit.packages')
|
| + .entityForUri(Uri.parse('file:///base/location/explicit.packages'))
|
| .writeAsStringSync('foo:baz\n');
|
| var raw = new CompilerOptions()
|
| ..fileSystem = fileSystem
|
| - ..packagesFilePath = '/base/location/explicit.packages';
|
| + ..packagesFilePath = Uri.parse('file:///base/location/explicit.packages');
|
| var processed = new ProcessedOptions(raw);
|
| var uriResolver = await processed.getUriResolver();
|
| expect(
|
| @@ -70,10 +74,12 @@ class ProcessedOptionsTest {
|
|
|
| test_getUriResolver_noPackages() async {
|
| // .packages file should be ignored.
|
| - fileSystem.entityForPath('/.packages').writeAsStringSync('foo:bar\n');
|
| + fileSystem
|
| + .entityForUri(Uri.parse('file:///.packages'))
|
| + .writeAsStringSync('foo:bar\n');
|
| var raw = new CompilerOptions()
|
| ..fileSystem = fileSystem
|
| - ..packagesFilePath = '';
|
| + ..packagesFilePath = new Uri();
|
| var processed = new ProcessedOptions(raw);
|
| var uriResolver = await processed.getUriResolver();
|
| expect(uriResolver.packages, isEmpty);
|
|
|