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

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

Issue 13527004: Add comments to the synchronous file methods stating that they throw (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | « 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_error_test.dart
diff --git a/tests/standalone/io/file_error_test.dart b/tests/standalone/io/file_error_test.dart
index c7b07e9222a1bc394ee12f1459d6925ce2ef748d..5f1e8ecc1b97f0b455957c1f8b97d6fd92a62a6d 100644
--- a/tests/standalone/io/file_error_test.dart
+++ b/tests/standalone/io/file_error_test.dart
@@ -453,6 +453,26 @@ testRepeatedlyCloseFileSync() {
});
}
+testReadSyncBigInt() {
+ createTestFile((file, port) {
+ var bigint = 100000000000000000000000000000000000000000;
+ var openedFile = file.openSync();
+ Expect.throws(() => openedFile.readSync(bigint),
+ (e) => e is FileIOException);
+ port.send(null);
+ });
+}
+
+testReadSyncClosedFile() {
+ createTestFile((file, port) {
+ var openedFile = file.openSync();
+ openedFile.closeSync();
+ Expect.throws(() => openedFile.readSync(1),
+ (e) => e is FileIOException);
+ port.send(null);
+ });
+}
+
main() {
testOpenNonExistent();
testDeleteNonExistent();
@@ -469,4 +489,6 @@ main() {
testOperateOnClosedFile();
testRepeatedlyCloseFile();
testRepeatedlyCloseFileSync();
+ testReadSyncBigInt();
+ testReadSyncClosedFile();
}
« no previous file with comments | « sdk/lib/io/file_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698