Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: pkg/analyzer/test/file_system/memory_file_system_test.dart

Issue 428303004: Breaking changes in 'analyzer' package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rename Source.resolveRelative to resolveRelativeUri, soften version constraints Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/pubspec.yaml ('k') | pkg/analyzer/test/file_system/physical_resource_provider_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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');
});
});
});
« no previous file with comments | « pkg/analyzer/pubspec.yaml ('k') | pkg/analyzer/test/file_system/physical_resource_provider_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698