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

Unified Diff: tests/utils/uri_test.dart

Issue 10989013: Change IllegalArgumentException to ArgumentError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated co19 test expectations. Created 8 years, 3 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
Index: tests/utils/uri_test.dart
diff --git a/tests/utils/uri_test.dart b/tests/utils/uri_test.dart
index 88771479b2f0e97fc87fee434dda33ac1e619c34..38d79c8534bf0bb4f6f99191dc815b722d012d45 100644
--- a/tests/utils/uri_test.dart
+++ b/tests/utils/uri_test.dart
@@ -142,7 +142,7 @@ main() {
new Uri.fromString("https://example.com:1234/a/b/c").origin);
Expect.throws(
() => new Uri.fromString("http:").origin,
- (e) { return e is IllegalArgumentException; },
+ (e) { return e is ArgumentError; },
"origin for uri with empty domain should fail");
Expect.throws(
() => const Uri.fromComponents(
@@ -153,7 +153,7 @@ main() {
path: "/a/b/c",
query: "query",
fragment: "fragment").origin,
- (e) { return e is IllegalArgumentException; },
+ (e) { return e is ArgumentError; },
"origin for uri with empty domain should fail");
Expect.throws(
() => const Uri.fromComponents(
@@ -164,7 +164,7 @@ main() {
path: "/a/b/c",
query: "query",
fragment: "fragment").origin,
- (e) { return e is IllegalArgumentException; },
+ (e) { return e is ArgumentError; },
"origin for uri with empty scheme should fail");
Expect.throws(
() => const Uri.fromComponents(
@@ -175,15 +175,15 @@ main() {
path: "/a/b/c",
query: "query",
fragment: "fragment").origin,
- (e) { return e is IllegalArgumentException; },
+ (e) { return e is ArgumentError; },
"origin for uri with empty domain should fail");
Expect.throws(
() => new Uri.fromString("http://:80").origin,
- (e) { return e is IllegalArgumentException; },
+ (e) { return e is ArgumentError; },
"origin for uri with empty domain should fail");
Expect.throws(
() => new Uri.fromString("file://localhost/test.txt").origin,
- (e) { return e is IllegalArgumentException; },
+ (e) { return e is ArgumentError; },
"origin for non-http/https uri should fail");
// URI encode tests

Powered by Google App Engine
This is Rietveld 408576698