| Index: tests/language/on_catch_malformed_type_test.dart
|
| ===================================================================
|
| --- tests/language/on_catch_malformed_type_test.dart (revision 29871)
|
| +++ tests/language/on_catch_malformed_type_test.dart (working copy)
|
| @@ -6,6 +6,8 @@
|
| // are treated as dynamic and thus catches all in bith production and checked
|
| // mode.
|
|
|
| +import "package:expect/expect.dart";
|
| +
|
| catchUnresolvedBefore() {
|
| try {
|
| throw "foo";
|
| @@ -19,13 +21,18 @@
|
|
|
| catchUnresolvedAfter() {
|
| try {
|
| - throw "foo";
|
| + try {
|
| + throw "foo";
|
| + Expect.fail("This code shouldn't be executed");
|
| + } on Unavailable catch(ex) {
|
| + // This is tested before the catch block below.
|
| + // In both production and checked mode the test throws a TypeError.
|
| + Expect.fail("This code shouldn't be executed");
|
| + } on String catch(oks) {
|
| + Expect.fail("This code shouldn't be executed");
|
| + }
|
| Expect.fail("This code shouldn't be executed");
|
| - } on Unavailable catch(ex) {
|
| - // This is tested before the catch block below.
|
| - // In both production and checked mode the test is always true.
|
| - } on String catch(oks) {
|
| - Expect.fail("This code shouldn't be executed");
|
| + } on TypeError catch(ex) {
|
| }
|
| }
|
|
|
|
|