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

Unified Diff: tests/language/list_literal4_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/list_literal3_test.dart ('k') | tests/language/local_function3_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/list_literal4_test.dart
diff --git a/tests/language/list_literal4_test.dart b/tests/language/list_literal4_test.dart
index fb436d77021417920d32ca8a92c40574319f3aa9..92935f527491673b0a9f3c4c57cd9c00aef0d122 100644
--- a/tests/language/list_literal4_test.dart
+++ b/tests/language/list_literal4_test.dart
@@ -10,41 +10,41 @@ class ListLiteral4Test<T> {
int result = 0;
try {
var m = <String>[0, 1]; // 0 is not a String.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
result += 1;
}
try {
var m = <int>[0, 1];
m["0"] = 1; // "0" is not an int.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
result += 10;
}
try {
var m = <T>["a", "b"]; // "b" is not an int.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
result += 100;
}
try {
var m = <T>[0, 1]; // OK.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
result += 1000;
}
try {
var m = <T>[0, 1];
m["0"] = 1; // "0" is not an int.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
result += 10000;
}
try {
var m = const <int>[0, 1];
m["0"] = 1; // "0" is not an int.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
result += 100000;
}
try {
var m = <T>[0, 1]; // OK. Tested above.
List<String> ls = m; // m is a List<int>, not a List<String>.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
result += 1000000;
}
« no previous file with comments | « tests/language/list_literal3_test.dart ('k') | tests/language/local_function3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698