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

Unified Diff: tests/language/local_function_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/local_function3_test.dart ('k') | tests/language/map_literal1_negative_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/local_function_test.dart
diff --git a/tests/language/local_function_test.dart b/tests/language/local_function_test.dart
index e53dc9afc4bbffccf990300eec2c811193be8202..0ecde13286d057ef1a77997864d36488217abdbd 100644
--- a/tests/language/local_function_test.dart
+++ b/tests/language/local_function_test.dart
@@ -142,21 +142,21 @@ class LocalFunctionTest {
bool exception_caught = false;
try {
f(1, 2);
- } catch (ClosureArgumentMismatchException e) {
+ } on ClosureArgumentMismatchException catch (e) {
exception_caught = true;
}
Expect.equals(true, exception_caught);
exception_caught = false;
try {
f();
- } catch (ClosureArgumentMismatchException e) {
+ } on ClosureArgumentMismatchException catch (e) {
exception_caught = true;
}
Expect.equals(true, exception_caught);
exception_caught = false;
try {
f.xyz(0);
- } catch (NoSuchMethodException e) {
+ } on NoSuchMethodException catch (e) {
exception_caught = true;
}
Expect.equals(true, exception_caught);
@@ -166,7 +166,7 @@ class LocalFunctionTest {
exception_caught = false;
try {
f(1);
- } catch (ObjectNotClosureException e) {
+ } on ObjectNotClosureException catch (e) {
exception_caught = true;
}
Expect.equals(true, exception_caught);
« no previous file with comments | « tests/language/local_function3_test.dart ('k') | tests/language/map_literal1_negative_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698