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

Unified Diff: tests/language/function_malformed_result_type_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/f_bounded_quantification_test.dart ('k') | tests/language/function_type_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/function_malformed_result_type_test.dart
diff --git a/tests/language/function_malformed_result_type_test.dart b/tests/language/function_malformed_result_type_test.dart
index 8d8a0f1fe4f12788bf3112571b0ae9d308fc6e26..c41936e0f6420afebe9018d92691fa5ddbeb28b2 100644
--- a/tests/language/function_malformed_result_type_test.dart
+++ b/tests/language/function_malformed_result_type_test.dart
@@ -10,7 +10,7 @@ isCheckedMode() {
var i = 1;
String s = i;
return false;
- } catch(var e) {
+ } catch (e) {
return true;
}
}
@@ -21,7 +21,7 @@ main() {
bool got_type_error = false;
try {
f();
- } catch (TypeError error) {
+ } on TypeError catch (error) {
got_type_error = true;
}
// No type error expected, since returned null is not type checked.
@@ -32,7 +32,7 @@ main() {
bool got_type_error = false;
try {
f();
- } catch (TypeError error) {
+ } on TypeError catch (error) {
got_type_error = true;
}
// Type error expected in checked mode only.
« no previous file with comments | « tests/language/f_bounded_quantification_test.dart ('k') | tests/language/function_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698