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

Unified Diff: tests/language/named_parameters_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
Index: tests/language/named_parameters_type_test.dart
diff --git a/tests/language/named_parameters_type_test.dart b/tests/language/named_parameters_type_test.dart
index a6a87b2481692e428ecf7a65f01b6cb41780303f..8d0b5d1fcfe0921134bacce5f0735380b1894208 100644
--- a/tests/language/named_parameters_type_test.dart
+++ b/tests/language/named_parameters_type_test.dart
@@ -21,21 +21,21 @@ class NamedParametersTypeTest {
acceptFunNumOptBool(funNumOptBool); // No error.
try {
acceptFunNumOptBool(funNum); // No static type warning.
- } catch (TypeError error) {
+ } on TypeError catch (error) {
result += 1;
Expect.stringEquals("(num, [b: bool]) => void", error.dstType);
Expect.stringEquals("(num) => void", error.srcType);
}
try {
acceptFunNumOptBool(funNumBool); /// static type warning
- } catch (TypeError error) {
+ } on TypeError catch (error) {
result += 10;
Expect.stringEquals("(num, [b: bool]) => void", error.dstType);
Expect.stringEquals("(num, bool) => void", error.srcType);
}
try {
acceptFunNumOptBool(funNumOptBoolX); /// static type warning
- } catch (TypeError error) {
+ } on TypeError catch (error) {
result += 100;
Expect.stringEquals("(num, [b: bool]) => void", error.dstType);
Expect.stringEquals("(num, [x: bool]) => void", error.srcType);
« no previous file with comments | « tests/language/named_parameters9_negative_test.dart ('k') | tests/language/named_parameters_with_conversions_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698