Index: tests/language/function_type/function_type61_test.dart |
diff --git a/tests/language/function_type/function_type61_test.dart b/tests/language/function_type/function_type61_test.dart |
index fee52798afe1171bbf842f6e558294e2ff43e405..f55ad37e17311220078b32b82fb770595263b500 100644 |
--- a/tests/language/function_type/function_type61_test.dart |
+++ b/tests/language/function_type/function_type61_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 x1]); |
-typedef F1<T> |
- = List<Function> Function([List<T> x1]); |
-typedef F2<T> |
- = List<T> Function(core.List<core.int> x0); |
-typedef F3<T> |
- = void Function(int y, [List<Function> x]); |
-typedef F4<T> |
- = void Function<A>(); |
-typedef F5<T> |
- = int Function(int x1, [List<Function> x]) Function(int x); |
-typedef F6<T> |
- = int Function([List<T> x1]) Function(int x); |
-typedef F7<T> |
- = Function Function(int x, [Function x1]) Function(int x); |
-typedef F8<T> |
- = Function Function(int y, {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(core.List<core.int> x1) Function(int x); |
-typedef F11<T> |
- = core.List<core.int> Function(int x2, [int x3]) Function(int x); |
-typedef F12<T> |
- = core.List<core.int> Function(int x1, {List<Function> x}) Function(int x); |
-typedef F13<T> |
- = List<T> Function(int x) Function(int x); |
-typedef F14<T> |
- = List<T> Function(int y, [List<Function> x]) Function(int x); |
-typedef F15<T> |
- = List<T> Function(int x2, [List<T> x3]) Function(int x); |
-typedef F16<T> |
- = Function({Function x}) Function(int x); |
-typedef F17<T> |
- = Function(List<T> x) Function(int x); |
-typedef F18<T> |
- = void Function(int x1, [Function x]) Function(int x); |
-typedef F19<T> |
- = void Function([core.List<core.int> x1]) Function(int x); |
-typedef F20<T> |
- = int Function<A>(List<A> x) Function(int x); |
-typedef F21<T> |
- = List<T> Function<A>(int x) Function(int x); |
-typedef F22<T> |
- = List<A> Function<A>(Function x) Function(int x); |
+typedef F0<T> = Function Function([int x1]); |
+typedef F1<T> = List<Function> Function([List<T> x1]); |
+typedef F2<T> = List<T> Function(core.List<core.int> x0); |
+typedef F3<T> = void Function(int y, [List<Function> x]); |
+typedef F4<T> = void Function<A>(); |
+typedef F5<T> = int Function(int x1, [List<Function> x]) Function(int x); |
+typedef F6<T> = int Function([List<T> x1]) Function(int x); |
+typedef F7<T> = Function Function(int x, [Function x1]) Function(int x); |
+typedef F8<T> = Function Function(int y, {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(core.List<core.int> x1) Function( |
+ int x); |
+typedef F11<T> = core.List<core.int> Function(int x2, [int x3]) Function(int x); |
+typedef F12<T> = core.List<core.int> Function(int x1, {List<Function> x}) |
+ Function(int x); |
+typedef F13<T> = List<T> Function(int x) Function(int x); |
+typedef F14<T> = List<T> Function(int y, [List<Function> x]) Function(int x); |
+typedef F15<T> = List<T> Function(int x2, [List<T> x3]) Function(int x); |
+typedef F16<T> = Function({Function x}) Function(int x); |
+typedef F17<T> = Function(List<T> x) Function(int x); |
+typedef F18<T> = void Function(int x1, [Function x]) Function(int x); |
+typedef F19<T> = void Function([core.List<core.int> x1]) Function(int x); |
+typedef F20<T> = int Function<A>(List<A> x) Function(int x); |
+typedef F21<T> = List<T> Function<A>(int x) Function(int x); |
+typedef F22<T> = List<A> Function<A>(Function x) Function(int x); |
Function f0([int x0]) => null; |
List<Function> f1([List<int> x0]) => null; |
@@ -232,7 +206,7 @@ class U61<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 U61<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); |
}); |
@@ -409,7 +383,7 @@ class U61<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); |
}); |
@@ -471,8 +445,8 @@ class U61<T> { |
} |
Expect.isTrue(m8 is F8); |
- Expect.isTrue(m8 is Function Function(int y, |
- {core.List<core.int> x}) Function(int x)); |
+ Expect.isTrue(m8 is Function Function(int y, {core.List<core.int> x}) |
+ Function(int x)); |
Expect.isTrue(confuse(m8) is F8); |
// In checked mode, verifies the type. |
x8 = m8; |
@@ -572,7 +546,8 @@ class U61<T> { |
Expect.isTrue(m12 is F12); |
Expect.isTrue(m12 is core.List<core.int> Function(int x1, |
- {List<Function> x}) Function(int x)); |
+ {List<Function> x}) |
+ Function(int x)); |
Expect.isTrue(confuse(m12) is F12); |
// In checked mode, verifies the type. |
x12 = m12; |
@@ -611,7 +586,7 @@ class U61<T> { |
Expect.equals(tIsDynamic, m13 is F13<bool>); |
Expect.equals(tIsDynamic, confuse(m13) is F13<bool>); |
} else { |
- if (inCheckedMode) { |
+ if (typeAssertionsEnabled) { |
Expect.throws(() { |
x13 = (f13 as dynamic); |
}); |
@@ -664,7 +639,7 @@ class U61<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); |
}); |
@@ -717,7 +692,7 @@ class U61<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); |
}); |
@@ -793,7 +768,7 @@ class U61<T> { |
Expect.equals(tIsDynamic, m17 is F17<bool>); |
Expect.equals(tIsDynamic, confuse(m17) is F17<bool>); |
} else { |
- if (inCheckedMode) { |
+ if (typeAssertionsEnabled) { |
Expect.throws(() { |
x17 = (f17 as dynamic); |
}); |
@@ -918,7 +893,7 @@ class U61<T> { |
Expect.equals(tIsDynamic, m21 is F21<bool>); |
Expect.equals(tIsDynamic, confuse(m21) is F21<bool>); |
} else { |
- if (inCheckedMode) { |
+ if (typeAssertionsEnabled) { |
Expect.throws(() { |
x21 = (f21 as dynamic); |
}); |