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

Unified Diff: pkg/unittest/core_matchers.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: pkg/unittest/core_matchers.dart
diff --git a/pkg/unittest/core_matchers.dart b/pkg/unittest/core_matchers.dart
index 3e76a5bffc4d0395de5a6bfa72e53fce7918626b..95cea20a24cf0a01fa5f65034a8a2582d0e10e14 100644
--- a/pkg/unittest/core_matchers.dart
+++ b/pkg/unittest/core_matchers.dart
@@ -423,16 +423,16 @@ class _Exception extends _ExceptionMatcher {
bool matches(item, MatchState matchState) => item is Exception;
}
-/** A matcher for IllegalArgumentExceptions. */
-const isIllegalArgumentException = const _IllegalArgumentException();
+/** A matcher for ArgumentErrors. */
+const isArgumentError = const _ArgumentError();
-/** A matcher for functions that throw IllegalArgumentException */
-const Matcher throwsIllegalArgumentException =
- const _Throws(isIllegalArgumentException);
+/** A matcher for functions that throw ArgumentError */
+const Matcher throwsArgumentError =
+ const _Throws(isArgumentError);
-class _IllegalArgumentException extends _ExceptionMatcher {
- const _IllegalArgumentException() : super("IllegalArgumentException");
- bool matches(item, MatchState matchState) => item is IllegalArgumentException;
+class _ArgumentError extends _ExceptionMatcher {
+ const _ArgumentError() : super("ArgumentError");
+ bool matches(item, MatchState matchState) => item is ArgumentError;
}
/** A matcher for IllegalJSRegExpExceptions. */

Powered by Google App Engine
This is Rietveld 408576698