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

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

Issue 2165843002: Add a toUri method to Resource (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Added tests Created 4 years, 5 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/test/file_system/memory_file_system_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/file_system/physical_resource_provider_test.dart
diff --git a/pkg/analyzer/test/file_system/physical_resource_provider_test.dart b/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
index 939882283488e8295bb92ee53d7d47e09b347645..e1f4a0029b2cb01ed223df9c4444d6832f990fb9 100644
--- a/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
+++ b/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
@@ -180,6 +180,12 @@ class FileTest extends _BaseTest {
expect(file.exists, isTrue);
}
+ void test_toUri() {
+ String path = '/foo/file.txt';
+ File file = PhysicalResourceProvider.INSTANCE.getFile(path);
+ expect(file.toUri(), new Uri.file(path));
+ }
+
void test_shortName() {
expect(file.shortName, 'file.txt');
}
@@ -373,6 +379,12 @@ class FolderTest extends _BaseTest {
parent = grandParent;
}
}
+
+ void test_toUri() {
+ String path = '/foo/directory';
+ Folder folder = PhysicalResourceProvider.INSTANCE.getFolder(path);
+ expect(folder.toUri(), new Uri.directory(path));
+ }
}
@reflectiveTest
« no previous file with comments | « pkg/analyzer/test/file_system/memory_file_system_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698