Index: tests/language/function_type/function_type57_test.dart |
diff --git a/tests/language/function_type/function_type57_test.dart b/tests/language/function_type/function_type57_test.dart |
index 275566c591863a587176c060ab954a40212fc0f5..8fb33cc8999fc0b4110976fbcf63119e8fbb3bcf 100644 |
--- a/tests/language/function_type/function_type57_test.dart |
+++ b/tests/language/function_type/function_type57_test.dart |
@@ -19,58 +19,32 @@ import 'package:expect/expect.dart'; |
@AssumeDynamic() |
confuse(f) => f; |
-final bool inCheckedMode = (() { |
- bool result = false; |
- assert(result = true); |
- return result; |
-})(); |
- |
-typedef F0<T> |
- = Function Function([int x]); |
-typedef F1<T> |
- = List<Function> Function([List<T> x]); |
-typedef F2<T> |
- = List<T> Function(core.List<core.int> x); |
-typedef F3<T> |
- = void Function(int y, {Function x}); |
-typedef F4<T> |
- = void Function<A>(Function x); |
-typedef F5<T> |
- = int Function([List<Function> x]) Function(int x); |
-typedef F6<T> |
- = int Function(List<T> x1) Function(int x); |
-typedef F7<T> |
- = Function Function(int x2, [Function x3]) Function(int x); |
-typedef F8<T> |
- = Function Function(int x1, {core.List<core.int> x}) Function(int x); |
-typedef F9<T> |
- = List<Function> Function(Function x) Function(int x); |
-typedef F10<T> |
- = List<Function> Function(int y, [core.List<core.int> x]) Function(int x); |
-typedef F11<T> |
- = core.List<core.int> Function([int x1]) Function(int x); |
-typedef F12<T> |
- = core.List<core.int> Function({List<Function> x}) Function(int x); |
-typedef F13<T> |
- = core.List<core.int> Function() Function(int x); |
-typedef F14<T> |
- = List<T> Function(int x1, [List<Function> x]) Function(int x); |
-typedef F15<T> |
- = List<T> Function([List<T> x1]) Function(int x); |
-typedef F16<T> |
- = Function(int x, [Function x1]) Function(int x); |
-typedef F17<T> |
- = Function(int y, {core.List<core.int> x}) Function(int x); |
-typedef F18<T> |
- = void Function([Function x]) Function(int x); |
-typedef F19<T> |
- = void Function(core.List<core.int> x1) Function(int x); |
-typedef F20<T> |
- = int Function<A>(A x) Function(int x); |
-typedef F21<T> |
- = core.List<core.int> Function<A>(List<A> x) Function(int x); |
-typedef F22<T> |
- = List<A> Function<A>(int x) Function(int x); |
+typedef F0<T> = Function Function([int x]); |
+typedef F1<T> = List<Function> Function([List<T> x]); |
+typedef F2<T> = List<T> Function(core.List<core.int> x); |
+typedef F3<T> = void Function(int y, {Function x}); |
+typedef F4<T> = void Function<A>(Function x); |
+typedef F5<T> = int Function([List<Function> x]) Function(int x); |
+typedef F6<T> = int Function(List<T> x1) Function(int x); |
+typedef F7<T> = Function Function(int x2, [Function x3]) Function(int x); |
+typedef F8<T> = Function Function(int x1, {core.List<core.int> x}) Function( |
+ int x); |
+typedef F9<T> = List<Function> Function(Function x) Function(int x); |
+typedef F10<T> = List<Function> Function(int y, [core.List<core.int> x]) |
+ Function(int x); |
+typedef F11<T> = core.List<core.int> Function([int x1]) Function(int x); |
+typedef F12<T> = core.List<core.int> Function({List<Function> x}) Function( |
+ int x); |
+typedef F13<T> = core.List<core.int> Function() Function(int x); |
+typedef F14<T> = List<T> Function(int x1, [List<Function> x]) Function(int x); |
+typedef F15<T> = List<T> Function([List<T> x1]) Function(int x); |
+typedef F16<T> = Function(int x, [Function x1]) Function(int x); |
+typedef F17<T> = Function(int y, {core.List<core.int> x}) Function(int x); |
+typedef F18<T> = void Function([Function x]) Function(int x); |
+typedef F19<T> = void Function(core.List<core.int> x1) Function(int x); |
+typedef F20<T> = int Function<A>(A x) Function(int x); |
+typedef F21<T> = core.List<core.int> Function<A>(List<A> x) Function(int x); |
+typedef F22<T> = List<A> Function<A>(int x) Function(int x); |
Function f0([int x]) => null; |
List<Function> f1([List<int> x]) => null; |
@@ -232,7 +206,7 @@ class U57<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); |
}); |
@@ -284,7 +258,7 @@ class U57<T> { |
Expect.equals(tIsDynamic, m2 is F2<bool>); |
Expect.equals(tIsDynamic, confuse(m2) is F2<bool>); |
} else { |
- if (inCheckedMode) { |
+ if (typeAssertionsEnabled) { |
Expect.throws(() { |
x2 = (f2 as dynamic); |
}); |
@@ -408,7 +382,7 @@ class U57<T> { |
Expect.equals(tIsDynamic, m6 is F6<bool>); |
Expect.equals(tIsDynamic, confuse(m6) is F6<bool>); |
} else { |
- if (inCheckedMode) { |
+ if (typeAssertionsEnabled) { |
Expect.throws(() { |
x6 = (f6 as dynamic); |
}); |
@@ -470,8 +444,8 @@ class U57<T> { |
} |
Expect.isTrue(m8 is F8); |
- Expect.isTrue(m8 is Function Function(int x1, |
- {core.List<core.int> x}) Function(int x)); |
+ Expect.isTrue(m8 is Function Function(int x1, {core.List<core.int> x}) |
+ Function(int x)); |
Expect.isTrue(confuse(m8) is F8); |
// In checked mode, verifies the type. |
x8 = m8; |
@@ -519,8 +493,8 @@ class U57<T> { |
} |
Expect.isTrue(m10 is F10); |
- Expect.isTrue(m10 is List<Function> Function(int y, |
- [core.List<core.int> x]) Function(int x)); |
+ Expect.isTrue(m10 is List<Function> Function(int y, [core.List<core.int> x]) |
+ Function(int x)); |
Expect.isTrue(confuse(m10) is F10); |
// In checked mode, verifies the type. |
x10 = m10; |
@@ -569,8 +543,8 @@ class U57<T> { |
} |
Expect.isTrue(m12 is F12); |
- Expect.isTrue(m12 is core.List<core.int> Function( |
- {List<Function> x}) Function(int x)); |
+ Expect.isTrue(m12 is core.List<core.int> Function({List<Function> x}) |
+ Function(int x)); |
Expect.isTrue(confuse(m12) is F12); |
// In checked mode, verifies the type. |
x12 = m12; |
@@ -634,7 +608,7 @@ class U57<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); |
}); |
@@ -686,7 +660,7 @@ class U57<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); |
}); |