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

Side by Side Diff: tests/standalone/io/file_error_test.dart

Issue 13443006: Make sure to close file in test so the temp directory can be deleted on Windows (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // Dart test program for testing error handling in file I/O. 5 // Dart test program for testing error handling in file I/O.
6 6
7 import "dart:io"; 7 import "dart:io";
8 import "dart:isolate"; 8 import "dart:isolate";
9 9
10 Directory tempDir() { 10 Directory tempDir() {
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 port.send(null); 452 port.send(null);
453 }); 453 });
454 } 454 }
455 455
456 testReadSyncBigInt() { 456 testReadSyncBigInt() {
457 createTestFile((file, port) { 457 createTestFile((file, port) {
458 var bigint = 100000000000000000000000000000000000000000; 458 var bigint = 100000000000000000000000000000000000000000;
459 var openedFile = file.openSync(); 459 var openedFile = file.openSync();
460 Expect.throws(() => openedFile.readSync(bigint), 460 Expect.throws(() => openedFile.readSync(bigint),
461 (e) => e is FileIOException); 461 (e) => e is FileIOException);
462 openedFile.closeSync();
462 port.send(null); 463 port.send(null);
463 }); 464 });
464 } 465 }
465 466
466 testReadSyncClosedFile() { 467 testReadSyncClosedFile() {
467 createTestFile((file, port) { 468 createTestFile((file, port) {
468 var openedFile = file.openSync(); 469 var openedFile = file.openSync();
469 openedFile.closeSync(); 470 openedFile.closeSync();
470 Expect.throws(() => openedFile.readSync(1), 471 Expect.throws(() => openedFile.readSync(1),
471 (e) => e is FileIOException); 472 (e) => e is FileIOException);
(...skipping 13 matching lines...) Expand all
485 testReadAsLinesNonExistent(); 486 testReadAsLinesNonExistent();
486 testWriteByteToReadOnlyFile(); 487 testWriteByteToReadOnlyFile();
487 testWriteListToReadOnlyFile(); 488 testWriteListToReadOnlyFile();
488 testTruncateReadOnlyFile(); 489 testTruncateReadOnlyFile();
489 testOperateOnClosedFile(); 490 testOperateOnClosedFile();
490 testRepeatedlyCloseFile(); 491 testRepeatedlyCloseFile();
491 testRepeatedlyCloseFileSync(); 492 testRepeatedlyCloseFileSync();
492 testReadSyncBigInt(); 493 testReadSyncBigInt();
493 testReadSyncClosedFile(); 494 testReadSyncClosedFile();
494 } 495 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698