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

Unified Diff: tests/language/src/ExceptionTest.dart

Issue 9416067: Fix cacthing exception object: a null exception is always caught. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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 | « tests/language/language-leg.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/ExceptionTest.dart
===================================================================
--- tests/language/src/ExceptionTest.dart (revision 4404)
+++ tests/language/src/ExceptionTest.dart (working copy)
@@ -18,6 +18,17 @@
i += 10;
}
Expect.equals(20, i);
+
+ bool correctCatch = false;
+ try {
+ throw null;
+ } catch (String s) {
+ // null exception object is caught here.
+ correctCatch = true;
+ } catch (var x) {
+ correctCatch = false;
+ }
+ Expect.isTrue(correctCatch);
}
}
« no previous file with comments | « tests/language/language-leg.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698