| Index: tests/standalone/io/directory_error_test.dart
|
| diff --git a/tests/standalone/io/directory_error_test.dart b/tests/standalone/io/directory_error_test.dart
|
| index cf90f91f149fff0ff87d63d5699869816560efb3..fecb2231863f7d83feaafe508ccf1b46594b24ad 100644
|
| --- a/tests/standalone/io/directory_error_test.dart
|
| +++ b/tests/standalone/io/directory_error_test.dart
|
| @@ -17,15 +17,10 @@ bool checkCreateInNonExistentFileException(e) {
|
| Expect.isTrue(e.osError != null);
|
| Expect.isTrue(e.toString().indexOf("Creation failed") != -1);
|
| if (Platform.operatingSystem == "linux") {
|
| - Expect.isTrue(e.toString().indexOf("No such file or directory") != -1);
|
| Expect.equals(2, e.osError.errorCode);
|
| } else if (Platform.operatingSystem == "macos") {
|
| - Expect.isTrue(e.toString().indexOf("No such file or directory") != -1);
|
| Expect.equals(2, e.osError.errorCode);
|
| } else if (Platform.operatingSystem == "windows") {
|
| - Expect.isTrue(
|
| - e.toString().indexOf(
|
| - "The system cannot find the path specified") != -1);
|
| Expect.equals(3, e.osError.errorCode);
|
| }
|
|
|
| @@ -49,18 +44,11 @@ void testCreateInNonExistent(Directory temp, Function done) {
|
| bool checkCreateTempInNonExistentFileException(e) {
|
| Expect.isTrue(e is DirectoryIOException);
|
| Expect.isTrue(e.osError != null);
|
| - Expect.isTrue(e.toString().indexOf(
|
| - "Creation of temporary directory failed") != -1);
|
| if (Platform.operatingSystem == "linux") {
|
| - Expect.isTrue(e.toString().indexOf("No such file or directory") != -1);
|
| Expect.equals(2, e.osError.errorCode);
|
| } else if (Platform.operatingSystem == "macos") {
|
| - Expect.isTrue(e.toString().indexOf("No such file or directory") != -1);
|
| Expect.equals(2, e.osError.errorCode);
|
| } else if (Platform.operatingSystem == "windows") {
|
| - Expect.isTrue(
|
| - e.toString().indexOf(
|
| - "The system cannot find the path specified") != -1);
|
| Expect.equals(3, e.osError.errorCode);
|
| }
|
|
|
| @@ -84,16 +72,6 @@ void testCreateTempInNonExistent(Directory temp, Function done) {
|
| bool checkDeleteNonExistentFileException(e) {
|
| Expect.isTrue(e is DirectoryIOException);
|
| Expect.isTrue(e.osError != null);
|
| - Expect.isTrue(e.toString().indexOf("Deletion failed") != -1);
|
| - if (Platform.operatingSystem == "linux") {
|
| - Expect.isTrue(e.toString().indexOf("No such file or directory") != -1);
|
| - } else if (Platform.operatingSystem == "macos") {
|
| - Expect.isTrue(e.toString().indexOf("No such file or directory") != -1);
|
| - } else if (Platform.operatingSystem == "windows") {
|
| - Expect.isTrue(
|
| - e.toString().indexOf(
|
| - "The system cannot find the file specified") != -1);
|
| - }
|
| // File not not found has error code 2 on all supported platforms.
|
| Expect.equals(2, e.osError.errorCode);
|
|
|
| @@ -119,15 +97,10 @@ bool checkDeleteRecursivelyNonExistentFileException(e) {
|
| Expect.isTrue(e.osError != null);
|
| Expect.isTrue(e.toString().indexOf("Deletion failed") != -1);
|
| if (Platform.operatingSystem == "linux") {
|
| - Expect.isTrue(e.toString().indexOf("No such file or directory") != -1);
|
| Expect.equals(2, e.osError.errorCode);
|
| } else if (Platform.operatingSystem == "macos") {
|
| - Expect.isTrue(e.toString().indexOf("No such file or directory") != -1);
|
| Expect.equals(2, e.osError.errorCode);
|
| } else if (Platform.operatingSystem == "windows") {
|
| - Expect.isTrue(
|
| - e.toString().indexOf(
|
| - "The system cannot find the path specified") != -1);
|
| Expect.equals(3, e.osError.errorCode);
|
| }
|
|
|
| @@ -153,15 +126,10 @@ bool checkListNonExistentFileException(e) {
|
| Expect.isTrue(e.osError != null);
|
| Expect.isTrue(e.toString().indexOf("Directory listing failed") != -1);
|
| if (Platform.operatingSystem == "linux") {
|
| - Expect.isTrue(e.toString().indexOf("No such file or directory") != -1);
|
| Expect.equals(2, e.osError.errorCode);
|
| } else if (Platform.operatingSystem == "macos") {
|
| - Expect.isTrue(e.toString().indexOf("No such file or directory") != -1);
|
| Expect.equals(2, e.osError.errorCode);
|
| } else if (Platform.operatingSystem == "windows") {
|
| - Expect.isTrue(
|
| - e.toString().indexOf(
|
| - "The system cannot find the path specified") != -1);
|
| Expect.equals(3, e.osError.errorCode);
|
| }
|
|
|
|
|