Index: pkg/analyzer/test/file_system/memory_file_system_test.dart |
diff --git a/pkg/analyzer/test/file_system/memory_file_system_test.dart b/pkg/analyzer/test/file_system/memory_file_system_test.dart |
index 8956b418f8a02c8aaa9ddc3d5ac96829562bed9b..6023f9ef9b89e3ac1324f30f4875f23fdeaee03a 100644 |
--- a/pkg/analyzer/test/file_system/memory_file_system_test.dart |
+++ b/pkg/analyzer/test/file_system/memory_file_system_test.dart |
@@ -171,7 +171,7 @@ main() { |
provider.newFile(path, 'contents 1'); |
Resource file = provider.getResource(path); |
expect(file, new isInstanceOf<File>()); |
- Source source = (file as File).createSource(UriKind.FILE_URI); |
+ Source source = (file as File).createSource(); |
expect(source.contents.data, equals('contents 1')); |
provider.modifyFile(path, 'contents 2'); |
expect(source.contents.data, equals('contents 2')); |
@@ -373,21 +373,21 @@ main() { |
group('existent', () { |
setUp(() { |
File file = provider.newFile('/foo/test.dart', 'library test;'); |
- source = file.createSource(UriKind.FILE_URI); |
+ source = file.createSource(); |
}); |
group('==', () { |
group('true', () { |
test('self', () { |
File file = provider.newFile('/foo/test.dart', ''); |
- Source source = file.createSource(UriKind.FILE_URI); |
+ Source source = file.createSource(); |
expect(source == source, isTrue); |
}); |
test('same file', () { |
File file = provider.newFile('/foo/test.dart', ''); |
- Source sourceA = file.createSource(UriKind.FILE_URI); |
- Source sourceB = file.createSource(UriKind.FILE_URI); |
+ Source sourceA = file.createSource(); |
+ Source sourceB = file.createSource(); |
expect(sourceA == sourceB, isTrue); |
}); |
}); |
@@ -395,15 +395,15 @@ main() { |
group('false', () { |
test('not a memory Source', () { |
File file = provider.newFile('/foo/test.dart', ''); |
- Source source = file.createSource(UriKind.FILE_URI); |
+ Source source = file.createSource(); |
expect(source == new Object(), isFalse); |
}); |
test('different file', () { |
File fileA = provider.newFile('/foo/a.dart', ''); |
File fileB = provider.newFile('/foo/b.dart', ''); |
- Source sourceA = fileA.createSource(UriKind.FILE_URI); |
- Source sourceB = fileB.createSource(UriKind.FILE_URI); |
+ Source sourceA = fileA.createSource(); |
+ Source sourceB = fileB.createSource(); |
expect(sourceA == sourceB, isFalse); |
}); |
}); |
@@ -415,7 +415,7 @@ main() { |
}); |
test('encoding', () { |
- expect(source.encoding, 'f/foo/test.dart'); |
+ expect(source.encoding, 'file:///foo/test.dart'); |
}); |
test('exists', () { |
@@ -435,15 +435,15 @@ main() { |
}); |
test('resolveRelative', () { |
- var relative = source.resolveRelative(new Uri.file('bar/baz.dart')); |
- expect(relative.fullName, '/foo/bar/baz.dart'); |
+ Uri relative = source.resolveRelativeUri(new Uri.file('bar/baz.dart')); |
+ expect(relative.path, '/foo/bar/baz.dart'); |
}); |
}); |
group('non-existent', () { |
setUp(() { |
File file = provider.getResource('/foo/test.dart'); |
- source = file.createSource(UriKind.FILE_URI); |
+ source = file.createSource(); |
}); |
test('contents', () { |
@@ -453,7 +453,7 @@ main() { |
}); |
test('encoding', () { |
- expect(source.encoding, 'f/foo/test.dart'); |
+ expect(source.encoding, 'file:///foo/test.dart'); |
}); |
test('exists', () { |
@@ -469,8 +469,8 @@ main() { |
}); |
test('resolveRelative', () { |
- var relative = source.resolveRelative(new Uri.file('bar/baz.dart')); |
- expect(relative.fullName, '/foo/bar/baz.dart'); |
+ Uri relative = source.resolveRelativeUri(new Uri.file('bar/baz.dart')); |
+ expect(relative.path, '/foo/bar/baz.dart'); |
}); |
}); |
}); |