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

Unified Diff: tests/standalone/src/FileTest.dart

Issue 8439067: Implement fullPath method on File objects. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/FileTest.dart
diff --git a/tests/standalone/src/FileTest.dart b/tests/standalone/src/FileTest.dart
index 64f90f67d1e504e0b9a7b728ba72c0773101861c..6a005fe4de078ac9b1d1730953a2ac9f52a0088f 100644
--- a/tests/standalone/src/FileTest.dart
+++ b/tests/standalone/src/FileTest.dart
@@ -144,37 +144,41 @@ class FileTest {
Expect.fail("No errors expected");
};
file.createHandler = () {
- file.openHandler = () {
- file.noPendingWriteHandler = () {
- file.closeHandler = () {
- // Now read the contents of the file just written.
- List<int> buffer2 = new List<int>(bytes_read);
- file = new File(getFilename(outFilenameBase));
- file.errorHandler = (s) {
- Expect.fail("No errors expected");
- };
- file.openHandler = () {
- file.readListHandler = (bytes_read) {
- Expect.equals(42, bytes_read);
- file.closeHandler = () {
- // Now compare the two buffers to check if they
- // are identical.
- Expect.equals(buffer1.length, buffer2.length);
- for (int i = 0; i < buffer1.length; i++) {
- Expect.equals(buffer1[i], buffer2[i]);
- }
+ file.fullPathHandler = (s) {
Søren Gjesse 2011/11/03 08:07:53 Maybe check that s is not just outFilenameBase + "
Mads Ager (google) 2011/11/03 10:18:26 Done.
+ Expect.isTrue(new File(s).existsSync());
+ file.openHandler = () {
+ file.noPendingWriteHandler = () {
+ file.closeHandler = () {
+ // Now read the contents of the file just written.
+ List<int> buffer2 = new List<int>(bytes_read);
+ file = new File(getFilename(outFilenameBase));
+ file.errorHandler = (s) {
+ Expect.fail("No errors expected");
+ };
+ file.openHandler = () {
+ file.readListHandler = (bytes_read) {
+ Expect.equals(42, bytes_read);
+ file.closeHandler = () {
+ // Now compare the two buffers to check if they
+ // are identical.
+ Expect.equals(buffer1.length, buffer2.length);
+ for (int i = 0; i < buffer1.length; i++) {
+ Expect.equals(buffer1[i], buffer2[i]);
+ }
+ };
+ file.close();
};
- file.close();
+ file.readList(buffer2, 0, 42);
};
- file.readList(buffer2, 0, 42);
+ file.open();
};
- file.open();
+ file.close();
};
- file.close();
+ file.writeList(buffer1, 0, bytes_read);
};
- file.writeList(buffer1, 0, bytes_read);
+ file.open(true);
};
- file.open(true);
+ file.fullPath();
};
file.create();
};
@@ -202,6 +206,8 @@ class FileTest {
String outFilenameBase = getFilename("tests/vm/data/fixed_length_file");
file = new File(outFilenameBase + "_out");
file.createSync();
+ String path = file.fullPathSync();
+ Expect.isTrue(new File(path).existsSync());
Søren Gjesse 2011/11/03 08:07:53 Ditto.
Mads Ager (google) 2011/11/03 10:18:26 Done.
file.openSync(true);
file.writeListSync(buffer1, 0, bytes_read);
file.closeSync();
« no previous file with comments | « runtime/bin/file_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698