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

Unified Diff: tests/language/assertion_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/arithmetic_test.dart ('k') | tests/language/bad_named_parameters2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/assertion_test.dart
diff --git a/tests/language/assertion_test.dart b/tests/language/assertion_test.dart
index b2e015f6116648d325f37a01974bad5b02114ec8..8761bd64a3bbb1674941675ad28db87aa24829c5 100644
--- a/tests/language/assertion_test.dart
+++ b/tests/language/assertion_test.dart
@@ -10,7 +10,7 @@ class AssertionTest {
int i = 0;
try {
assert(true);
- } catch (AssertionError error) {
+ } on AssertionError catch (error) {
i = 1;
}
return i;
@@ -20,7 +20,7 @@ class AssertionTest {
int i = 0;
try {
assert(false);
- } catch (AssertionError error) {
+ } on AssertionError catch (error) {
i = 1;
}
return i;
@@ -35,17 +35,17 @@ class AssertionTest {
int i = 0;
try {
assert(x);
- } catch (AssertionError error) {
+ } on AssertionError catch (error) {
i = 1;
}
- return i;
+ return i;
}
static testClosure() {
int i = 0;
try {
assert(() => false);
- } catch (AssertionError error) {
+ } on AssertionError catch (error) {
i = 1;
}
return i;
@@ -56,7 +56,7 @@ class AssertionTest {
try {
var x = () => false;
assert(x);
- } catch (AssertionError error) {
+ } on AssertionError catch (error) {
i = 1;
}
return i;
« no previous file with comments | « tests/language/arithmetic_test.dart ('k') | tests/language/bad_named_parameters2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698