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

Unified Diff: pkg/unittest/lib/src/core_matchers.dart

Issue 11358060: Change NotImplementedException to UnimplementedError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 years, 1 month 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 | « pkg/intl/lib/src/date_format_field.dart ('k') | pkg/unittest/test/matchers_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/src/core_matchers.dart
diff --git a/pkg/unittest/lib/src/core_matchers.dart b/pkg/unittest/lib/src/core_matchers.dart
index 9d0fb2adefa73919d04a6a044dca565c20701aa5..046da2c699b5c7217e0490989738eae7c7dca1af 100644
--- a/pkg/unittest/lib/src/core_matchers.dart
+++ b/pkg/unittest/lib/src/core_matchers.dart
@@ -490,17 +490,26 @@ class _NoSuchMethodError extends TypeMatcher {
bool matches(item, MatchState matchState) => item is NoSuchMethodError;
}
+/** A matcher for UnimplementedErrors. */
+const isUnimplementedError = const _UnimplementedError();
+
+/** A matcher for functions that throw Exception. */
+const Matcher throwsUnimplementedError =
+ const Throws(isUnimplementedError);
+
+class _UnimplementedError extends TypeMatcher {
+ const _UnimplementedError() : super("UnimplementedError");
+ bool matches(item, MatchState matchState) => item is UnimplementedError;
+}
+
+// Temporary matcher until NotImplementedException is removed.
/** A matcher for NotImplementedExceptions. */
-const isNotImplementedException = const _NotImplementedException();
+const isNotImplementedException = isUnimplementedError;
/** A matcher for functions that throw Exception. */
const Matcher throwsNotImplementedException =
- const Throws(isNotImplementedException);
+ const Throws(isUnimplementedError);
-class _NotImplementedException extends TypeMatcher {
- const _NotImplementedException() : super("NotImplementedException");
- bool matches(item, MatchState matchState) => item is NotImplementedException;
-}
/** A matcher for NullPointerExceptions. */
const isNullPointerException = const _NullPointerException();
« no previous file with comments | « pkg/intl/lib/src/date_format_field.dart ('k') | pkg/unittest/test/matchers_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698