Index: tests/language/function_type/function_type9_test.dart |
diff --git a/tests/language/function_type/function_type9_test.dart b/tests/language/function_type/function_type9_test.dart |
index a2c7e6f3c207d81bd7f8cdbdedeb2ff6ec5bc2e7..c99e395f84f8666e8fba6e77ec5a0b0d8c50a273 100644 |
--- a/tests/language/function_type/function_type9_test.dart |
+++ b/tests/language/function_type/function_type9_test.dart |
@@ -19,61 +19,34 @@ import 'package:expect/expect.dart'; |
@AssumeDynamic() |
confuse(f) => f; |
-final bool inCheckedMode = (() { |
- bool result = false; |
- assert(result = true); |
- return result; |
-})(); |
- |
-typedef F0<T> |
- = int Function(int x0, {int x}); |
-typedef F1<T> |
- = Function Function(int x0, {List<T> x}); |
-typedef F2<T> |
- = core.List<core.int> Function({core.List<core.int> x}); |
-typedef F3<T> |
- = Function(int x, [List<Function> x2]); |
-typedef F4<T> |
- = List<Function> Function<A>(Function x); |
-typedef F5<T> |
- = int Function(Function x) Function(int x); |
-typedef F6<T> |
- = int Function(int y, [core.List<core.int> x]) Function(int x); |
-typedef F7<T> |
- = Function Function([int x1]) Function(int x); |
-typedef F8<T> |
- = Function Function({List<Function> x}) Function(int x); |
-typedef F9<T> |
- = Function Function() Function(int x); |
-typedef F10<T> |
- = List<Function> Function(int x1, [List<Function> x]) Function(int x); |
-typedef F11<T> |
- = List<Function> Function([List<T> x1]) Function(int x); |
-typedef F12<T> |
- = core.List<core.int> Function(int x, [Function x1]) Function(int x); |
-typedef F13<T> |
- = core.List<core.int> Function(int y, {core.List<core.int> x}) Function( |
- int x); |
-typedef F14<T> |
- = List<T> Function([Function x]) Function(int x); |
-typedef F15<T> |
- = List<T> Function(core.List<core.int> x1) Function(int x); |
-typedef F16<T> |
- = Function(int x2, [int x3]) Function(int x); |
-typedef F17<T> |
- = Function(int x1, {List<Function> x}) Function(int x); |
-typedef F18<T> |
- = void Function(int x) Function(int x); |
-typedef F19<T> |
- = void Function(int y, [List<Function> x]) Function(int x); |
-typedef F20<T> |
- = void Function(int x2, [List<T> x3]) Function(int x); |
-typedef F21<T> |
- = List<Function> Function<A>(core.List<core.int> x) Function(int x); |
-typedef F22<T> |
- = Function<A>(List<T> x) Function(int x); |
-typedef F23<T> |
- = void Function<A>() Function(int x); |
+typedef F0<T> = int Function(int x0, {int x}); |
+typedef F1<T> = Function Function(int x0, {List<T> x}); |
+typedef F2<T> = core.List<core.int> Function({core.List<core.int> x}); |
+typedef F3<T> = Function(int x, [List<Function> x2]); |
+typedef F4<T> = List<Function> Function<A>(Function x); |
+typedef F5<T> = int Function(Function x) Function(int x); |
+typedef F6<T> = int Function(int y, [core.List<core.int> x]) Function(int x); |
+typedef F7<T> = Function Function([int x1]) Function(int x); |
+typedef F8<T> = Function Function({List<Function> x}) Function(int x); |
+typedef F9<T> = Function Function() Function(int x); |
+typedef F10<T> = List<Function> Function(int x1, [List<Function> x]) Function( |
+ int x); |
+typedef F11<T> = List<Function> Function([List<T> x1]) Function(int x); |
+typedef F12<T> = core.List<core.int> Function(int x, [Function x1]) Function( |
+ int x); |
+typedef F13<T> = core.List<core.int> Function(int y, {core.List<core.int> x}) |
+ Function(int x); |
+typedef F14<T> = List<T> Function([Function x]) Function(int x); |
+typedef F15<T> = List<T> Function(core.List<core.int> x1) Function(int x); |
+typedef F16<T> = Function(int x2, [int x3]) Function(int x); |
+typedef F17<T> = Function(int x1, {List<Function> x}) Function(int x); |
+typedef F18<T> = void Function(int x) Function(int x); |
+typedef F19<T> = void Function(int y, [List<Function> x]) Function(int x); |
+typedef F20<T> = void Function(int x2, [List<T> x3]) Function(int x); |
+typedef F21<T> = List<Function> Function<A>(core.List<core.int> x) Function( |
+ int x); |
+typedef F22<T> = Function<A>(List<T> x) Function(int x); |
+typedef F23<T> = void Function<A>() Function(int x); |
int f0(int x0, {int x}) => null; |
Function f1(int x0, {List<int> x}) => null; |
@@ -241,7 +214,7 @@ class U9<T> { |
Expect.equals(tIsDynamic, m1 is F1<bool>); |
Expect.equals(tIsDynamic, confuse(m1) is F1<bool>); |
} else { |
- if (inCheckedMode) { |
+ if (typeAssertionsEnabled) { |
Expect.throws(() { |
x1 = (f1 as dynamic); |
}); |
@@ -471,8 +444,8 @@ class U9<T> { |
} |
Expect.isTrue(m10 is F10); |
- Expect.isTrue(m10 is List<Function> Function(int x1, |
- [List<Function> x]) Function(int x)); |
+ Expect.isTrue(m10 is List<Function> Function(int x1, [List<Function> x]) |
+ Function(int x)); |
Expect.isTrue(confuse(m10) is F10); |
// In checked mode, verifies the type. |
x10 = m10; |
@@ -511,7 +484,7 @@ class U9<T> { |
Expect.equals(tIsDynamic, m11 is F11<bool>); |
Expect.equals(tIsDynamic, confuse(m11) is F11<bool>); |
} else { |
- if (inCheckedMode) { |
+ if (typeAssertionsEnabled) { |
Expect.throws(() { |
x11 = (f11 as dynamic); |
}); |
@@ -548,8 +521,8 @@ class U9<T> { |
} |
Expect.isTrue(m12 is F12); |
- Expect.isTrue(m12 is core.List<core.int> Function(int x, |
- [Function x1]) Function(int x)); |
+ Expect.isTrue(m12 is core.List<core.int> Function(int x, [Function x1]) |
+ Function(int x)); |
Expect.isTrue(confuse(m12) is F12); |
// In checked mode, verifies the type. |
x12 = m12; |
@@ -575,7 +548,8 @@ class U9<T> { |
Expect.isTrue(m13 is F13); |
Expect.isTrue(m13 is core.List<core.int> Function(int y, |
- {core.List<core.int> x}) Function(int x)); |
+ {core.List<core.int> x}) |
+ Function(int x)); |
Expect.isTrue(confuse(m13) is F13); |
// In checked mode, verifies the type. |
x13 = m13; |
@@ -614,7 +588,7 @@ class U9<T> { |
Expect.equals(tIsDynamic, m14 is F14<bool>); |
Expect.equals(tIsDynamic, confuse(m14) is F14<bool>); |
} else { |
- if (inCheckedMode) { |
+ if (typeAssertionsEnabled) { |
Expect.throws(() { |
x14 = (f14 as dynamic); |
}); |
@@ -667,7 +641,7 @@ class U9<T> { |
Expect.equals(tIsDynamic, m15 is F15<bool>); |
Expect.equals(tIsDynamic, confuse(m15) is F15<bool>); |
} else { |
- if (inCheckedMode) { |
+ if (typeAssertionsEnabled) { |
Expect.throws(() { |
x15 = (f15 as dynamic); |
}); |
@@ -816,7 +790,7 @@ class U9<T> { |
Expect.equals(tIsDynamic, m20 is F20<bool>); |
Expect.equals(tIsDynamic, confuse(m20) is F20<bool>); |
} else { |
- if (inCheckedMode) { |
+ if (typeAssertionsEnabled) { |
Expect.throws(() { |
x20 = (f20 as dynamic); |
}); |
@@ -853,8 +827,8 @@ class U9<T> { |
} |
Expect.isTrue(m21 is F21); |
- Expect.isTrue(m21 is List<Function> Function<A>( |
- core.List<core.int> x) Function(int x)); |
+ Expect.isTrue(m21 is List<Function> Function<A>(core.List<core.int> x) |
+ Function(int x)); |
Expect.isTrue(confuse(m21) is F21); |
// In checked mode, verifies the type. |
x21 = m21; |
@@ -893,7 +867,7 @@ class U9<T> { |
Expect.equals(tIsDynamic, m22 is F22<bool>); |
Expect.equals(tIsDynamic, confuse(m22) is F22<bool>); |
} else { |
- if (inCheckedMode) { |
+ if (typeAssertionsEnabled) { |
Expect.throws(() { |
x22 = (f22 as dynamic); |
}); |