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

Unified Diff: tests/standalone/io/directory_test.dart

Issue 10639004: Add .fromPath constructors to File and Directory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 6 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 | « runtime/bin/file_impl.dart ('k') | tests/standalone/io/file_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/directory_test.dart
diff --git a/tests/standalone/io/directory_test.dart b/tests/standalone/io/directory_test.dart
index 139c8692f0bde607ec8c3810294f2114ec3b6d9e..488b1d02b0d07ed978258b4cd80dcdc3baf16191 100644
--- a/tests/standalone/io/directory_test.dart
+++ b/tests/standalone/io/directory_test.dart
@@ -320,6 +320,15 @@ class DirectoryTest {
}
}
+ static void testFromPath() {
+ var name = new File('.').fullPathSync();
+ Directory current1 = new Directory(name);
+ var path = new Path.fromNative(name);
+ Directory current2 = new Directory.fromPath(path);
+ Expect.equals(current1.path, current2.path);
+ Expect.isTrue(current1.existsSync());
+ }
+
static void testMain() {
testListing();
testListNonExistent();
@@ -333,6 +342,7 @@ class DirectoryTest {
testCreateTemp();
testCreateDeleteTemp();
testCurrent();
+ testFromPath();
}
}
« no previous file with comments | « runtime/bin/file_impl.dart ('k') | tests/standalone/io/file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698