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

Unified Diff: tests/corelib/uri_file_test.dart

Issue 1063603004: Fix typo in test, add check of error thrown. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 months 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 | « sdk/lib/core/uri.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/uri_file_test.dart
diff --git a/tests/corelib/uri_file_test.dart b/tests/corelib/uri_file_test.dart
index b49b3d5433d7ca02338112040d87de9453182d61..79da8335d45a955cd34a54af594c54ee9a1299e5 100644
--- a/tests/corelib/uri_file_test.dart
+++ b/tests/corelib/uri_file_test.dart
@@ -224,10 +224,14 @@ testFileUriIllegalCharacters() {
Uri absoluteUri = new Uri.file("/$test", windows: false);
Uri dirUri = new Uri.directory(test, windows: false);
Uri dirAbsoluteUri = new Uri.directory("/$test", windows: false);
- Expect.throws(() => new Uri.file(test, windows: true));
- Expect.throws(() => new Uri.file("\\$test", windows: true));
- Expect.throws(() => new Uri.direcory(test, windows: true));
- Expect.throws(() => new Uri.directory("\\$test", windows: true));
+ Expect.throws(() => new Uri.file(test, windows: true),
+ (e) => e is ArgumentError);
+ Expect.throws(() => new Uri.file("\\$test", windows: true),
+ (e) => e is ArgumentError);
+ Expect.throws(() => new Uri.directory(test, windows: true),
+ (e) => e is ArgumentError);
+ Expect.throws(() => new Uri.directory("\\$test", windows: true),
+ (e) => e is ArgumentError);
// It is possible to extract non-Windows file path, but not
// Windows file path.
@@ -235,10 +239,14 @@ testFileUriIllegalCharacters() {
Expect.equals("/$test", absoluteUri.toFilePath(windows: false));
Expect.equals("$test/", dirUri.toFilePath(windows: false));
Expect.equals("/$test/", dirAbsoluteUri.toFilePath(windows: false));
- Expect.throws(() => uri.toFilePath(windows: true));
- Expect.throws(() => absoluteUri.toFilePath(windows: true));
- Expect.throws(() => dirUri.toFilePath(windows: true));
- Expect.throws(() => dirAbsoluteUri.toFilePath(windows: true));
+ Expect.throws(() => uri.toFilePath(windows: true),
+ (e) => e is UnsupportedError);
+ Expect.throws(() => absoluteUri.toFilePath(windows: true),
+ (e) => e is UnsupportedError);
+ Expect.throws(() => dirUri.toFilePath(windows: true),
+ (e) => e is UnsupportedError);
+ Expect.throws(() => dirAbsoluteUri.toFilePath(windows: true),
+ (e) => e is UnsupportedError);
}
// Backslash
@@ -261,10 +269,12 @@ testFileUriIllegalCharacters() {
Expect.equals("/$test/", dirAbsoluteUri.toFilePath(windows: false));
Expect.throws(() => uri.toFilePath(windows: true),
(e) => e is UnsupportedError);
- Expect.throws(() => absoluteUri.toFilePath(windows: true));
+ Expect.throws(() => absoluteUri.toFilePath(windows: true),
+ (e) => e is UnsupportedError);
Expect.throws(() => dirUri.toFilePath(windows: true),
(e) => e is UnsupportedError);
- Expect.throws(() => dirAbsoluteUri.toFilePath(windows: true));
+ Expect.throws(() => dirAbsoluteUri.toFilePath(windows: true),
+ (e) => e is UnsupportedError);
}
}
« no previous file with comments | « sdk/lib/core/uri.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698