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

Unified Diff: tests/language/exception_test.dart

Issue 10891020: Update almost all tests (except co19) to use the new try-catch syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge. Created 8 years, 4 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/exception_in_increment.dart ('k') | tests/language/execute_finally7_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/exception_test.dart
diff --git a/tests/language/exception_test.dart b/tests/language/exception_test.dart
index e0bae3b9fa088c433e024f080512c887ef7de857..c08a872556ce0cb481595844442db42588df4119 100644
--- a/tests/language/exception_test.dart
+++ b/tests/language/exception_test.dart
@@ -6,14 +6,14 @@ class ExceptionTest {
int i = 0;
try {
throw "Hello";
- } catch (String s) {
+ } on String catch (s) {
print(s);
i += 10;
}
try {
throw "bye";
- } catch (String s) {
+ } on String catch (s) {
print(s);
i += 10;
}
@@ -23,11 +23,11 @@ class ExceptionTest {
try {
// This throws NullPointerException.
throw null;
- } catch (String s) {
+ } on String catch (s) {
correctCatch = false;
- } catch (NullPointerException e) {
+ } on NullPointerException catch (e) {
correctCatch = true;
- } catch (var x) {
+ } catch (x) {
correctCatch = false;
}
Expect.isTrue(correctCatch);
« no previous file with comments | « tests/language/exception_in_increment.dart ('k') | tests/language/execute_finally7_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698