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

Unified Diff: tests/standalone/io/file_error_test.dart

Issue 11554021: Update Windows file implementation to use the unicode APIs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/file_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3c8d08431919800ac5fe968e37f2757ec5d04fdc..218879e1b1dd92bc129adfff63357866f7483622 100644
--- a/tests/standalone/io/file_error_test.dart
+++ b/tests/standalone/io/file_error_test.dart
@@ -16,18 +16,8 @@ bool checkNonExistentFileException(e, str) {
Expect.isTrue(e is FileIOException);
Expect.isTrue(e.osError != null);
Expect.isTrue(e.toString().indexOf(str) != -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);
-
return true;
}
@@ -121,15 +111,10 @@ bool checkCreateInNonExistentDirectoryException(e) {
Expect.isTrue(e.osError != null);
Expect.isTrue(e.toString().indexOf("Cannot create file") != -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);
}
@@ -162,15 +147,6 @@ bool checkFullPathOnNonExistentDirectoryException(e) {
Expect.isTrue(e is FileIOException);
Expect.isTrue(e.osError != null);
Expect.isTrue(e.toString().indexOf("Cannot retrieve full path") != -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);
@@ -204,15 +180,6 @@ bool checkDirectoryInNonExistentDirectoryException(e) {
Expect.isTrue(e.osError != null);
Expect.isTrue(
e.toString().indexOf("Cannot retrieve directory for file") != -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);
« no previous file with comments | « runtime/bin/file_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698