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 16c0e243f53b6811e03bd858d98e6905bc04b516..8af6f1f60d639f7d5d3c793d3303ea1c56a6210e 100644 |
--- a/tests/standalone/io/file_error_test.dart |
+++ b/tests/standalone/io/file_error_test.dart |
@@ -171,38 +171,6 @@ void testFullPathOnNonExistentDirectory() { |
}); |
} |
-bool checkDirectoryInNonExistentDirectoryException(e) { |
- Expect.isTrue(e is FileIOException); |
- Expect.isTrue(e.osError != null); |
- Expect.isTrue( |
- e.toString().indexOf("Cannot retrieve directory for file") != -1); |
- // File not not found has error code 2 on all supported platforms. |
- Expect.equals(2, e.osError.errorCode); |
- |
- return true; |
-} |
- |
-void testDirectoryInNonExistentDirectory() { |
- Directory temp = tempDir(); |
- ReceivePort p = new ReceivePort(); |
- p.receive((x, y) { |
- p.close(); |
- temp.deleteSync(recursive: true); |
- }); |
- var file = new File("${temp.path}/nonExistentDirectory/newFile"); |
- |
- // Create in non-existent directory should throw exception. |
- Expect.throws(() => file.directorySync(), |
- (e) => checkDirectoryInNonExistentDirectoryException(e)); |
- |
- var dirFuture = file.directory(); |
- dirFuture.then((directory) => Expect.fail("Unreachable code")) |
- .catchError((error) { |
- checkDirectoryInNonExistentDirectoryException(error); |
- p.toSendPort().send(null); |
- }); |
-} |
- |
void testReadAsBytesNonExistent() { |
Directory temp = tempDir(); |
ReceivePort p = new ReceivePort(); |
@@ -481,7 +449,6 @@ main() { |
testLengthNonExistent(); |
testCreateInNonExistentDirectory(); |
testFullPathOnNonExistentDirectory(); |
- testDirectoryInNonExistentDirectory(); |
testReadAsBytesNonExistent(); |
testReadAsTextNonExistent(); |
testReadAsLinesNonExistent(); |