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_error_test.dart

Issue 10536112: Add missing closed check to random access file. (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
« 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/io/file_error_test.dart
diff --git a/tests/standalone/io/file_error_test.dart b/tests/standalone/io/file_error_test.dart
index 57ffce261c46cbcddc09401b4d54fd498446d42f..094064cce1c0cf2c8e863ca99ffda6eb1586afa9 100644
--- a/tests/standalone/io/file_error_test.dart
+++ b/tests/standalone/io/file_error_test.dart
@@ -490,6 +490,16 @@ testRepeatedlyCloseFile() {
});
}
+testRepeatedlyCloseFileSync() {
+ createTestFile((file, port) {
+ var openedFile = file.openSync();
+ openedFile.closeSync();
+ Expect.throws(openedFile.closeSync,
+ (e) => e is FileIOException);
+ port.send(null);
+ });
+}
+
main() {
testOpenNonExistent();
testDeleteNonExistent();
@@ -505,4 +515,5 @@ main() {
testTruncateReadOnlyFile();
testOperateOnClosedFile();
testRepeatedlyCloseFile();
+ testRepeatedlyCloseFileSync();
}
« 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