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

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

Issue 10443008: Implement File.lastModified. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Return ms from C Created 8 years, 7 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 | « tests/standalone/io/file_fuzz_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
+ 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();
« no previous file with comments | « tests/standalone/io/file_fuzz_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698