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

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

Issue 24721003: Only allow one async operation on RandomAccessFile at a time. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
« sdk/lib/io/file_impl.dart ('K') | « sdk/lib/io/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/io/file_test.dart
diff --git a/tests/standalone/io/file_test.dart b/tests/standalone/io/file_test.dart
index 3b8c383469b2f1d29ede4d03f6d3565e0c0ca285..d245bf6a6efe6452d1d26e72ff305c0e8a387dd8 100644
--- a/tests/standalone/io/file_test.dart
+++ b/tests/standalone/io/file_test.dart
@@ -1082,6 +1082,17 @@ class FileTest {
});
}
+ static void testDoubleAsyncRead() {
Søren Gjesse 2013/09/26 18:31:19 testDoubleAsyncRead -> testDoubleAsyncOperation
Anders Johnsen 2013/10/01 10:50:40 Done.
+ asyncTestStarted();
+ var file = new File(Platform.executable).openSync();
+ Future.wait([file.length(), file.length()])
+ .then((_) {
+ Expect.fail("should fail.");
+ }, onError: (_) {
+ asyncTestDone("testDoubleAsyncRead");
+ });
+ }
+
static void testLastModifiedSync() {
var modified = new File(Platform.executable).lastModifiedSync();
Expect.isTrue(modified is DateTime);
@@ -1300,6 +1311,7 @@ class FileTest {
testRename();
testRenameSync();
testLastModified();
+ testDoubleAsyncRead();
asyncEnd();
});
}
« sdk/lib/io/file_impl.dart ('K') | « sdk/lib/io/file_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698