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

Unified Diff: tests/language/instanceof3_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/implied_interface_test.dart ('k') | tests/language/is_object_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/instanceof3_test.dart
diff --git a/tests/language/instanceof3_test.dart b/tests/language/instanceof3_test.dart
index e1d760657cc211b6c52ac0cf4fff602b700abdc6..e69eb65e7771461d39587d7c75290c8c3afb7650 100644
--- a/tests/language/instanceof3_test.dart
+++ b/tests/language/instanceof3_test.dart
@@ -11,7 +11,7 @@ isCheckedMode() {
var i = 1;
String s = i;
return false;
- } catch(var e) {
+ } catch (e) {
return true;
}
}
@@ -22,7 +22,7 @@ testAll() {
var x = null;
try {
Expect.isFalse(x is UndeclaredType); // x is null.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
got_type_error = true;
}
// Type error in production mode and in checked mode.
@@ -33,7 +33,7 @@ testAll() {
var x = 1;
try {
Expect.isFalse(x is UndeclaredType); // x is not null.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
got_type_error = true;
}
// Type error in production mode and in checked mode.
@@ -44,7 +44,7 @@ testAll() {
var x = null;
try {
Expect.isFalse(x is List<UndeclaredType>); // x is null.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
got_type_error = true;
}
// Type error in checked mode only.
@@ -55,7 +55,7 @@ testAll() {
var x = 1;
try {
Expect.isFalse(x is List<UndeclaredType>); // x is not a List.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
got_type_error = true;
}
// Type error in checked mode only.
@@ -66,7 +66,7 @@ testAll() {
var x = new List();
try {
Expect.isTrue(x is List<UndeclaredType>); // x is a List<Dynamic>.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
got_type_error = true;
}
// Type error in checked mode only.
@@ -77,7 +77,7 @@ testAll() {
var x = new List<int>();
try {
Expect.isTrue(x is List<UndeclaredType>); // x is a List<int>.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
got_type_error = true;
}
// Type error in checked mode only.
« no previous file with comments | « tests/language/implied_interface_test.dart ('k') | tests/language/is_object_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698