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

Unified Diff: pkg/unittest/test/matchers_test.dart

Issue 11417058: Revert "Remove NullPointerException." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/unittest/lib/src/core_matchers.dart ('k') | runtime/lib/double.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/test/matchers_test.dart
diff --git a/pkg/unittest/test/matchers_test.dart b/pkg/unittest/test/matchers_test.dart
index 81be8fbf22f91350c223cf5ec16e8f13c6278cba..c9045ad586688d9d96d2c38cba1971d2b1e21d30 100644
--- a/pkg/unittest/test/matchers_test.dart
+++ b/pkg/unittest/test/matchers_test.dart
@@ -155,6 +155,16 @@ void main() {
"UnimplementedError.");
});
+ test('throwsNullPointerException', () {
+ shouldPass(() { throw new NullPointerException(''); },
+ throwsNullPointerException);
+ shouldFail(() { throw new Exception(); },
+ throwsNullPointerException,
+ "Expected: throws an exception which matches NullPointerException "
+ "but: exception <Exception> does not match "
+ "NullPointerException.");
+ });
+
test('throwsUnsupportedError', () {
shouldPass(() { throw new UnsupportedError(''); },
throwsUnsupportedError);
« no previous file with comments | « pkg/unittest/lib/src/core_matchers.dart ('k') | runtime/lib/double.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698