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

Unified Diff: tests/language/map_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/map_literal2_negative_test.dart ('k') | tests/language/math_vm_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/map_literal4_test.dart
diff --git a/tests/language/map_literal4_test.dart b/tests/language/map_literal4_test.dart
index 5ac6782a5f96e8b3e486f23506351adefe6964df..35a3f97fb98a2237f9ba2939897295d3d30f2815 100644
--- a/tests/language/map_literal4_test.dart
+++ b/tests/language/map_literal4_test.dart
@@ -10,35 +10,35 @@ class MapLiteral4Test<T> {
int result = 0;
try {
var m = <String, String>{"a": 0}; // 0 is not a String.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
result += 1;
}
try {
var m = <String, int>{"a": 0};
m[2] = 1; // 2 is not a String.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
result += 10;
}
try {
var m = <String, T>{"a": "b"}; // "b" is not an int.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
result += 100;
}
try {
var m = <String, T>{"a": 0}; // OK.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
result += 1000;
}
try {
var m = <String, T>{"a": 0};
m[2] = 1; // 2 is not a String.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
result += 10000;
}
try {
var m = const <String, int>{"a": 0};
m[2] = 1; // 2 is not a String.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
result += 100000;
}
return result;
« no previous file with comments | « tests/language/map_literal2_negative_test.dart ('k') | tests/language/math_vm_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698