| Index: tests/standalone/src/io/FileErrorTest.dart
|
| diff --git a/tests/standalone/src/io/FileErrorTest.dart b/tests/standalone/src/io/FileErrorTest.dart
|
| index 295dfbc7d544efe86f89c093854cd000df572f00..40f2b62c9b3b2cfb7c4a05c7efecd16e7b0683f7 100644
|
| --- a/tests/standalone/src/io/FileErrorTest.dart
|
| +++ b/tests/standalone/src/io/FileErrorTest.dart
|
| @@ -18,12 +18,11 @@ bool checkNonExistentFileException(e, str) {
|
| Expect.isTrue(e is FileIOException);
|
| Expect.isTrue(e.osError != null);
|
| Expect.isTrue(e.toString().indexOf(str) != -1);
|
| - Platform platform = new Platform();
|
| - if (platform.operatingSystem() == "linux") {
|
| + if (Platform.operatingSystem() == "linux") {
|
| Expect.isTrue(e.toString().indexOf("No such file or directory") != -1);
|
| - } else if (platform.operatingSystem() == "macos") {
|
| + } else if (Platform.operatingSystem() == "macos") {
|
| Expect.isTrue(e.toString().indexOf("No such file or directory") != -1);
|
| - } else if (platform.operatingSystem() == "windows") {
|
| + } else if (Platform.operatingSystem() == "windows") {
|
| Expect.isTrue(
|
| e.toString().indexOf(
|
| "The system cannot find the file specified") != -1);
|
| @@ -117,14 +116,13 @@ bool checkCreateInNonExistentDirectoryException(e) {
|
| Expect.isTrue(e is FileIOException);
|
| Expect.isTrue(e.osError != null);
|
| Expect.isTrue(e.toString().indexOf("Cannot create file") != -1);
|
| - Platform platform = new Platform();
|
| - if (platform.operatingSystem() == "linux") {
|
| + 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") {
|
| + } 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") {
|
| + } else if (Platform.operatingSystem() == "windows") {
|
| Expect.isTrue(
|
| e.toString().indexOf(
|
| "The system cannot find the path specified") != -1);
|
| @@ -158,12 +156,11 @@ bool checkFullPathOnNonExistentDirectoryException(e) {
|
| Expect.isTrue(e is FileIOException);
|
| Expect.isTrue(e.osError != null);
|
| Expect.isTrue(e.toString().indexOf("Cannot retrieve full path") != -1);
|
| - Platform platform = new Platform();
|
| - if (platform.operatingSystem() == "linux") {
|
| + if (Platform.operatingSystem() == "linux") {
|
| Expect.isTrue(e.toString().indexOf("No such file or directory") != -1);
|
| - } else if (platform.operatingSystem() == "macos") {
|
| + } else if (Platform.operatingSystem() == "macos") {
|
| Expect.isTrue(e.toString().indexOf("No such file or directory") != -1);
|
| - } else if (platform.operatingSystem() == "windows") {
|
| + } else if (Platform.operatingSystem() == "windows") {
|
| Expect.isTrue(
|
| e.toString().indexOf(
|
| "The system cannot find the file specified") != -1);
|
| @@ -199,12 +196,11 @@ bool checkDirectoryInNonExistentDirectoryException(e) {
|
| Expect.isTrue(e.osError != null);
|
| Expect.isTrue(
|
| e.toString().indexOf("Cannot retrieve directory for file") != -1);
|
| - Platform platform = new Platform();
|
| - if (platform.operatingSystem() == "linux") {
|
| + if (Platform.operatingSystem() == "linux") {
|
| Expect.isTrue(e.toString().indexOf("No such file or directory") != -1);
|
| - } else if (platform.operatingSystem() == "macos") {
|
| + } else if (Platform.operatingSystem() == "macos") {
|
| Expect.isTrue(e.toString().indexOf("No such file or directory") != -1);
|
| - } else if (platform.operatingSystem() == "windows") {
|
| + } else if (Platform.operatingSystem() == "windows") {
|
| Expect.isTrue(
|
| e.toString().indexOf(
|
| "The system cannot find the file specified") != -1);
|
|
|