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

Unified Diff: tests/standalone/io/file_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: 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
Index: tests/standalone/io/file_test.dart
diff --git a/tests/standalone/io/file_test.dart b/tests/standalone/io/file_test.dart
index 0c87af6610ba97239bdefaa69a3817a93a14d157..fed6af6806cab434240a4d1d73ca60120d0f718f 100644
--- a/tests/standalone/io/file_test.dart
+++ b/tests/standalone/io/file_test.dart
@@ -977,6 +977,18 @@ class FileTest {
}
}
+ static void testOpenFileFromPath() {
+ var name = getFilename("tests/vm/data/fixed_length_file");
+ var path = new Path(name);
+ var f = new File.fromPath(path);
+ Expect.isTrue(f.existsSync());
+ name = f.fullPathSync();
+ path = new Path.fromNative(name);
+ var g = new File.fromPath(path);
+ Expect.isTrue(g.existsSync());
+ Expect.equals(name, g.fullPathSync());
+ }
+
static void testReadAsBytes() {
var port = new ReceivePort();
port.receive((result, replyTo) {
@@ -1187,6 +1199,7 @@ class FileTest {
testPositionSync();
testOpenDirectoryAsFile();
testOpenDirectoryAsFileSync();
+ testOpenFileFromPath();
testReadAsBytes();
testReadAsBytesSync();
testReadAsText();
« tests/standalone/io/directory_test.dart ('K') | « tests/standalone/io/directory_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698