| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "package:expect/expect.dart"; | |
| 8 import "dart:io"; | 7 import "dart:io"; |
| 9 import "dart:isolate"; | 8 import "dart:isolate"; |
| 10 | 9 |
| 11 Directory tempDir() { | 10 Directory tempDir() { |
| 12 return new Directory('').createTempSync(); | 11 return new Directory('').createTempSync(); |
| 13 } | 12 } |
| 14 | 13 |
| 15 | 14 |
| 16 bool checkNonExistentFileException(e, str) { | 15 bool checkNonExistentFileException(e, str) { |
| 17 Expect.isTrue(e is FileIOException); | 16 Expect.isTrue(e is FileIOException); |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 testReadAsBytesNonExistent(); | 463 testReadAsBytesNonExistent(); |
| 465 testReadAsTextNonExistent(); | 464 testReadAsTextNonExistent(); |
| 466 testReadAsLinesNonExistent(); | 465 testReadAsLinesNonExistent(); |
| 467 testWriteByteToReadOnlyFile(); | 466 testWriteByteToReadOnlyFile(); |
| 468 testWriteListToReadOnlyFile(); | 467 testWriteListToReadOnlyFile(); |
| 469 testTruncateReadOnlyFile(); | 468 testTruncateReadOnlyFile(); |
| 470 testOperateOnClosedFile(); | 469 testOperateOnClosedFile(); |
| 471 testRepeatedlyCloseFile(); | 470 testRepeatedlyCloseFile(); |
| 472 testRepeatedlyCloseFileSync(); | 471 testRepeatedlyCloseFileSync(); |
| 473 } | 472 } |
| OLD | NEW |