Chromium Code Reviews| Index: tests/standalone/io/file_test.dart |
| diff --git a/tests/standalone/io/file_test.dart b/tests/standalone/io/file_test.dart |
| index 0f8c548d20b505ba017d1b3dd4b18391e2c0e4ef..852b2534ac83f341aa7db9267f5020591ac5bca8 100644 |
| --- a/tests/standalone/io/file_test.dart |
| +++ b/tests/standalone/io/file_test.dart |
| @@ -971,6 +971,21 @@ class FileTest { |
| }); |
| } |
| + static void testLastModified() { |
| + var port = new ReceivePort(); |
| + new File(new Options().executable).lastModified().then((modified) { |
|
Anders Johnsen
2012/05/24 12:05:42
Cute :)
|
| + Expect.isTrue(modified is Date); |
| + Expect.isTrue(modified < new Date.now()); |
| + port.close(); |
| + }); |
| + } |
| + |
| + static void testLastModifiedSync() { |
| + var modified = new File(new Options().executable).lastModifiedSync(); |
| + Expect.isTrue(modified is Date); |
| + Expect.isTrue(modified < new Date.now()); |
| + } |
| + |
| // Test that opens the same file for writing then for appending to test |
| // that the file is not truncated when opened for appending. |
| static void testAppend() { |
| @@ -1044,6 +1059,8 @@ class FileTest { |
| testReadAsLines(); |
| testReadAsLinesSync(); |
| testReadAsErrors(); |
| + testLastModified(); |
| + testLastModifiedSync(); |
| createTempDirectory(() { |
| testReadWrite(); |