| Index: tests/language/malformed_test.dart
|
| diff --git a/tests/language/malformed_test.dart b/tests/language/malformed_test.dart
|
| index 23ba383ef5802c2cee17df359580ff2e8283e3aa..22851bf3f015f148963caf81add046a3192d3ff2 100644
|
| --- a/tests/language/malformed_test.dart
|
| +++ b/tests/language/malformed_test.dart
|
| @@ -6,7 +6,7 @@
|
| // wrong number of type arguments are handled as raw types.
|
|
|
| import 'package:expect/expect.dart';
|
| -import 'package:expect/expect.dart' as prefix; // Define 'prefix'.
|
| +import 'package:expect/expect.dart' as prefix; // Define 'prefix'.
|
|
|
| checkIsUnresolved(var v) {
|
| Expect.throws(() => v is Unresolved, (e) => e is TypeError);
|
| @@ -46,8 +46,8 @@ checkAsListUnresolved(bool expect, var v) {
|
| Expect.throws(() => v as List<Unresolved>, (e) => e is CastError);
|
| Expect.throws(() => v as List<Unresolved<int>>, (e) => e is CastError);
|
| Expect.throws(() => v as List<prefix.Unresolved>, (e) => e is CastError);
|
| - Expect.throws(() => v as List<prefix.Unresolved<int>>,
|
| - (e) => e is CastError);
|
| + Expect.throws(
|
| + () => v as List<prefix.Unresolved<int>>, (e) => e is CastError);
|
| Expect.throws(() => v as List<int, String>, (e) => e is CastError);
|
| }
|
| }
|
| @@ -57,7 +57,6 @@ checkIsMapDynamic(bool first, bool second, var v) {
|
| Expect.equals(second, v is Map<Object, int> && v is Map<Object, String>);
|
| }
|
|
|
| -
|
| void main() {
|
| checkIsUnresolved('');
|
| checkIsUnresolved(0);
|
| @@ -100,7 +99,7 @@ void main() {
|
| checkIsMapDynamic(true, true, <String, int, String>{});
|
| checkIsMapDynamic(true, false, <Unresolved, int>{});
|
| checkIsMapDynamic(false, true, <String, Unresolved<int>>{});
|
| - checkIsMapDynamic(true, false, <prefix.Unresolved, int>{});
|
| + checkIsMapDynamic(true, false, <prefix.Unresolved, int>{});
|
| checkIsMapDynamic(false, true, <String, prefix.Unresolved<int>>{});
|
|
|
| checkIsMapDynamic(true, true, new Map());
|
| @@ -110,7 +109,7 @@ void main() {
|
| checkIsMapDynamic(true, true, new Map<String, int, String>());
|
| checkIsMapDynamic(true, false, new Map<Unresolved, int>());
|
| checkIsMapDynamic(false, true, new Map<String, Unresolved<int>>());
|
| - checkIsMapDynamic(true, false, new Map<prefix.Unresolved, int>());
|
| + checkIsMapDynamic(true, false, new Map<prefix.Unresolved, int>());
|
| checkIsMapDynamic(false, true, new Map<String, prefix.Unresolved<int>>());
|
|
|
| Expect.throws(() => new Unresolved(), (e) => true);
|
| @@ -131,8 +130,7 @@ void main() {
|
| Expect.fail("This code shouldn't be executed");
|
| }
|
| Expect.fail("This code shouldn't be executed");
|
| - } on TypeError catch (e) {
|
| - }
|
| + } on TypeError catch (e) {}
|
| try {
|
| try {
|
| throw 'foo';
|
| @@ -140,8 +138,7 @@ void main() {
|
| Expect.fail("This code shouldn't be executed");
|
| }
|
| Expect.fail("This code shouldn't be executed");
|
| - } on TypeError catch (e) {
|
| - }
|
| + } on TypeError catch (e) {}
|
| try {
|
| try {
|
| throw 'foo';
|
| @@ -149,8 +146,7 @@ void main() {
|
| Expect.fail("This code shouldn't be executed");
|
| }
|
| Expect.fail("This code shouldn't be executed");
|
| - } on TypeError catch (e) {
|
| - }
|
| + } on TypeError catch (e) {}
|
| try {
|
| try {
|
| throw 'foo';
|
| @@ -158,12 +154,10 @@ void main() {
|
| Expect.fail("This code shouldn't be executed");
|
| }
|
| Expect.fail("This code shouldn't be executed");
|
| - } on TypeError catch (e) {
|
| - }
|
| + } on TypeError catch (e) {}
|
| try {
|
| throw 'foo';
|
| }
|
| on undeclared_prefix.Unresolved<int> // //# 06: runtime error
|
| - catch (e) {
|
| - }
|
| -}
|
| + catch (e) {}
|
| +}
|
|
|