diff --git a/tests/web/deferred_function_types1_test.dart b/tests/web/deferred_function_types1_test.dart index 91c907538f4..842521f2124 100644 --- a/tests/web/deferred_function_types1_test.dart +++ b/tests/web/deferred_function_types1_test.dart @@ -5,14 +5,17 @@ // dart2jsOptions=--strong import 'package:expect/expect.dart'; +import 'package:async_helper/async_helper.dart'; import 'deferred_function_types_lib1.dart' deferred as lib1; import 'deferred_function_types_lib2.dart' deferred as lib2; -main() async { - await lib1.loadLibrary(); - Expect.isTrue(lib1.method1() is int Function(int)); - Expect.isFalse(lib1.method1() is String Function(String)); - await lib2.loadLibrary(); - Expect.isFalse(lib2.method2() is int Function(int)); - Expect.isTrue(lib2.method2() is String Function(String)); +main() { + asyncTest(() async { + await lib1.loadLibrary(); + Expect.isTrue(lib1.method1() is int Function(int)); + Expect.isFalse(lib1.method1() is String Function(String)); + await lib2.loadLibrary(); + Expect.isFalse(lib2.method2() is int Function(int)); + Expect.isTrue(lib2.method2() is String Function(String)); + }); } diff --git a/tests/web/deferred_function_types2_test.dart b/tests/web/deferred_function_types2_test.dart index 4336421b854..99e81a04934 100644 --- a/tests/web/deferred_function_types2_test.dart +++ b/tests/web/deferred_function_types2_test.dart @@ -4,15 +4,18 @@ // dart2jsOptions=--strong +import 'package:async_helper/async_helper.dart'; import 'package:expect/expect.dart'; import 'deferred_function_types_lib1.dart' deferred as lib1; import 'deferred_function_types_lib2.dart' deferred as lib2; -main() async { - await lib2.loadLibrary(); - Expect.isFalse(lib2.method2() is int Function(int)); - Expect.isTrue(lib2.method2() is String Function(String)); - await lib1.loadLibrary(); - Expect.isTrue(lib1.method1() is int Function(int)); - Expect.isFalse(lib1.method1() is String Function(String)); +main() { + asyncTest(() async { + await lib2.loadLibrary(); + Expect.isFalse(lib2.method2() is int Function(int)); + Expect.isTrue(lib2.method2() is String Function(String)); + await lib1.loadLibrary(); + Expect.isTrue(lib1.method1() is int Function(int)); + Expect.isFalse(lib1.method1() is String Function(String)); + }); } diff --git a/tests/web/deferred_function_types3_test.dart b/tests/web/deferred_function_types3_test.dart index 98a6de8df91..ebd2eec49b7 100644 --- a/tests/web/deferred_function_types3_test.dart +++ b/tests/web/deferred_function_types3_test.dart @@ -4,15 +4,18 @@ // dart2jsOptions=--strong +import 'package:async_helper/async_helper.dart'; import 'package:expect/expect.dart'; import 'deferred_function_types_lib1.dart' deferred as lib1; import 'deferred_function_types_lib2.dart' deferred as lib2; -main() async { - await lib1.loadLibrary(); - Expect.isTrue(lib1.method3() is Object Function(Null)); - Expect.isFalse(lib1.method3() is Object Function(Null, Null)); - await lib2.loadLibrary(); - Expect.isFalse(lib2.method4() is Object Function(Null)); - Expect.isTrue(lib2.method4() is Object Function(Null, Null)); +main() { + asyncTest(() async { + await lib1.loadLibrary(); + Expect.isTrue(lib1.method3() is Object? Function(Null)); + Expect.isFalse(lib1.method3() is Object? Function(Null, Null)); + await lib2.loadLibrary(); + Expect.isFalse(lib2.method4() is Object? Function(Null)); + Expect.isTrue(lib2.method4() is Object? Function(Null, Null)); + }); } diff --git a/tests/web/deferred_function_types4_test.dart b/tests/web/deferred_function_types4_test.dart index fc78d96a8bd..7577065d49c 100644 --- a/tests/web/deferred_function_types4_test.dart +++ b/tests/web/deferred_function_types4_test.dart @@ -4,15 +4,18 @@ // dart2jsOptions=--strong +import 'package:async_helper/async_helper.dart'; import 'package:expect/expect.dart'; import 'deferred_function_types_lib1.dart' deferred as lib1; import 'deferred_function_types_lib2.dart' deferred as lib2; -main() async { - await lib2.loadLibrary(); - Expect.isFalse(lib2.method4() is Object Function(Null)); - Expect.isTrue(lib2.method4() is Object Function(Null, Null)); - await lib1.loadLibrary(); - Expect.isTrue(lib1.method3() is Object Function(Null)); - Expect.isFalse(lib1.method3() is Object Function(Null, Null)); +main() { + asyncTest(() async { + await lib2.loadLibrary(); + Expect.isFalse(lib2.method4() is Object? Function(Null)); + Expect.isTrue(lib2.method4() is Object? Function(Null, Null)); + await lib1.loadLibrary(); + Expect.isTrue(lib1.method3() is Object? Function(Null)); + Expect.isFalse(lib1.method3() is Object? Function(Null, Null)); + }); } diff --git a/tests/web/deferred_function_types5_test.dart b/tests/web/deferred_function_types5_test.dart index 998d678ba49..da9019690fa 100644 --- a/tests/web/deferred_function_types5_test.dart +++ b/tests/web/deferred_function_types5_test.dart @@ -4,15 +4,18 @@ // dart2jsOptions=--strong +import 'package:async_helper/async_helper.dart'; import 'package:expect/expect.dart'; import 'deferred_function_types_lib1.dart' deferred as lib1; import 'deferred_function_types_lib2.dart' deferred as lib2; -main() async { - await lib1.loadLibrary(); - Expect.isTrue(lib1.test3(lib1.method3())); - Expect.isFalse(lib1.method3() is Object Function(String)); - await lib2.loadLibrary(); - Expect.isFalse(lib2.method4() is Object Function(String, String)); - Expect.isTrue(lib2.test4(lib2.method4())); +main() { + asyncTest(() async { + await lib1.loadLibrary(); + Expect.isTrue(lib1.test3(lib1.method3())); + Expect.isFalse(lib1.method3() is Object Function(String)); + await lib2.loadLibrary(); + Expect.isFalse(lib2.method4() is Object Function(String, String)); + Expect.isTrue(lib2.test4(lib2.method4())); + }); } diff --git a/tests/web/deferred_function_types6_test.dart b/tests/web/deferred_function_types6_test.dart index 2423b523276..d0d2b57eeb7 100644 --- a/tests/web/deferred_function_types6_test.dart +++ b/tests/web/deferred_function_types6_test.dart @@ -4,15 +4,18 @@ // dart2jsOptions=--strong +import 'package:async_helper/async_helper.dart'; import 'package:expect/expect.dart'; import 'deferred_function_types_lib1.dart' deferred as lib1; import 'deferred_function_types_lib2.dart' deferred as lib2; -main() async { - await lib2.loadLibrary(); - Expect.isFalse(lib2.method4() is Object Function(String, String)); - Expect.isTrue(lib2.test4(lib2.method4())); - await lib1.loadLibrary(); - Expect.isTrue(lib1.test3(lib1.method3())); - Expect.isFalse(lib1.method3() is Object Function(String)); +main() { + asyncTest(() async { + await lib2.loadLibrary(); + Expect.isFalse(lib2.method4() is Object Function(String, String)); + Expect.isTrue(lib2.test4(lib2.method4())); + await lib1.loadLibrary(); + Expect.isTrue(lib1.test3(lib1.method3())); + Expect.isFalse(lib1.method3() is Object Function(String)); + }); } diff --git a/tests/web/deferred_function_types7_test.dart b/tests/web/deferred_function_types7_test.dart index fe7c49e1d7e..6627800eb24 100644 --- a/tests/web/deferred_function_types7_test.dart +++ b/tests/web/deferred_function_types7_test.dart @@ -5,20 +5,26 @@ // dart2jsOptions=--strong import 'package:expect/expect.dart'; +import 'package:async_helper/async_helper.dart'; import 'deferred_function_types_lib1.dart' deferred as lib1; import 'deferred_function_types_lib2.dart' deferred as lib2; -main() async { - await lib1.loadLibrary(); - Expect.isTrue(lib1.method1() is int Function(int)); - Expect.isFalse(lib1.method1() is String Function(String)); - Expect.isTrue(lib1.method5 is Object Function(Null, String, int)); - Expect.isFalse(lib1.method5 is Object Function(Null, int, String)); - Expect.isTrue(lib1.test5(lib1.method5)); - await lib2.loadLibrary(); - Expect.isFalse(lib2.method2() is int Function(int)); - Expect.isTrue(lib2.method2() is String Function(String)); - Expect.isFalse(lib2.method6 is Object Function(Null, String, int)); - Expect.isTrue(lib2.method6 is Object Function(Null, int, String)); - Expect.isTrue(lib2.test6(lib2.method6)); +@pragma('dart2js:never-inline') +confuse(f) => f; + +main() { + asyncTest(() async { + await lib1.loadLibrary(); + Expect.isTrue(lib1.method1() is int Function(int)); + Expect.isFalse(lib1.method1() is String Function(String)); + Expect.isTrue(confuse(lib1.method5) is Object? Function(Null, String, int)); + Expect.isFalse(lib1.method5 is Object? Function(Null, int, String)); + Expect.isTrue(lib1.test5(lib1.method5)); + await lib2.loadLibrary(); + Expect.isFalse(lib2.method2() is int Function(int)); + Expect.isTrue(lib2.method2() is String Function(String)); + Expect.isFalse(lib2.method6 is Object? Function(Null, String, int)); + Expect.isTrue(confuse(lib2.method6) is Object? Function(Null, int, String)); + Expect.isTrue(lib2.test6(lib2.method6)); + }); } diff --git a/tests/web/deferred_function_types8_test.dart b/tests/web/deferred_function_types8_test.dart index 7222ef5c257..859cd00c3f1 100644 --- a/tests/web/deferred_function_types8_test.dart +++ b/tests/web/deferred_function_types8_test.dart @@ -4,21 +4,27 @@ // dart2jsOptions=--strong +import 'package:async_helper/async_helper.dart'; import 'package:expect/expect.dart'; import 'deferred_function_types_lib1.dart' deferred as lib1; import 'deferred_function_types_lib2.dart' deferred as lib2; -main() async { - await lib2.loadLibrary(); - Expect.isFalse(lib2.method2() is int Function(int)); - Expect.isTrue(lib2.method2() is String Function(String)); - Expect.isFalse(lib2.method6 is Object Function(Null, String, int)); - Expect.isTrue(lib2.method6 is Object Function(Null, int, String)); - Expect.isTrue(lib2.test6(lib2.method6)); - await lib1.loadLibrary(); - Expect.isTrue(lib1.method1() is int Function(int)); - Expect.isFalse(lib1.method1() is String Function(String)); - Expect.isTrue(lib1.method5 is Object Function(Null, String, int)); - Expect.isFalse(lib1.method5 is Object Function(Null, int, String)); - Expect.isTrue(lib1.test5(lib1.method5)); +@pragma('dart2js:never-inline') +confuse(f) => f; + +main() { + asyncTest(() async { + await lib2.loadLibrary(); + Expect.isFalse(lib2.method2() is int Function(int)); + Expect.isTrue(lib2.method2() is String Function(String)); + Expect.isFalse(lib2.method6 is Object? Function(Null, String, int)); + Expect.isTrue(confuse(lib2.method6) is Object? Function(Null, int, String)); + Expect.isTrue(lib2.test6(lib2.method6)); + await lib1.loadLibrary(); + Expect.isTrue(lib1.method1() is int Function(int)); + Expect.isFalse(lib1.method1() is String Function(String)); + Expect.isTrue(confuse(lib1.method5) is Object? Function(Null, String, int)); + Expect.isFalse(lib1.method5 is Object? Function(Null, int, String)); + Expect.isTrue(lib1.test5(lib1.method5)); + }); } diff --git a/tests/web/deferred_function_types_lib1.dart b/tests/web/deferred_function_types_lib1.dart index 8a3a06f60d7..f94ba3e0a46 100644 --- a/tests/web/deferred_function_types_lib1.dart +++ b/tests/web/deferred_function_types_lib1.dart @@ -9,11 +9,11 @@ method1() { class Class1 {} method3() { - return (Class1 c) => c; + return (Class1? c) => c; } -test3(o) => o is Class1 Function(Class1); +test3(o) => o is Class1? Function(Class1?); -method5(Class1 c, String s, int i) {} +method5(Class1? c, String s, int i) {} -test5(o) => o is Function(Class1, String, int); +test5(o) => o is Function(Class1?, String, int); diff --git a/tests/web/deferred_function_types_lib2.dart b/tests/web/deferred_function_types_lib2.dart index a209dacd939..4df39cd53be 100644 --- a/tests/web/deferred_function_types_lib2.dart +++ b/tests/web/deferred_function_types_lib2.dart @@ -9,11 +9,11 @@ method2() { class Class2 {} method4() { - return (Class2 c1, Class2 c2) => c1; + return (Class2? c1, Class2? c2) => c1; } -test4(o) => o is Class2 Function(Class2, Class2); +test4(o) => o is Class2? Function(Class2?, Class2?); -method6(Class2 c, int i, String s) {} +method6(Class2? c, int i, String s) {} -test6(o) => o is Function(Class2, int, String); +test6(o) => o is Function(Class2?, int, String); diff --git a/tests/web_2/deferred_function_types1_test.dart b/tests/web_2/deferred_function_types1_test.dart index 2e853e1ca06..607c1407e9f 100644 --- a/tests/web_2/deferred_function_types1_test.dart +++ b/tests/web_2/deferred_function_types1_test.dart @@ -6,15 +6,18 @@ // dart2jsOptions=--strong +import 'package:async_helper/async_helper.dart'; import 'package:expect/expect.dart'; import 'deferred_function_types_lib1.dart' deferred as lib1; import 'deferred_function_types_lib2.dart' deferred as lib2; -main() async { - await lib1.loadLibrary(); - Expect.isTrue(lib1.method1() is int Function(int)); - Expect.isFalse(lib1.method1() is String Function(String)); - await lib2.loadLibrary(); - Expect.isFalse(lib2.method2() is int Function(int)); - Expect.isTrue(lib2.method2() is String Function(String)); +main() { + asyncTest(() async { + await lib1.loadLibrary(); + Expect.isTrue(lib1.method1() is int Function(int)); + Expect.isFalse(lib1.method1() is String Function(String)); + await lib2.loadLibrary(); + Expect.isFalse(lib2.method2() is int Function(int)); + Expect.isTrue(lib2.method2() is String Function(String)); + }); } diff --git a/tests/web_2/deferred_function_types2_test.dart b/tests/web_2/deferred_function_types2_test.dart index 586e1b8dcf7..087996efa31 100644 --- a/tests/web_2/deferred_function_types2_test.dart +++ b/tests/web_2/deferred_function_types2_test.dart @@ -6,15 +6,18 @@ // dart2jsOptions=--strong +import 'package:async_helper/async_helper.dart'; import 'package:expect/expect.dart'; import 'deferred_function_types_lib1.dart' deferred as lib1; import 'deferred_function_types_lib2.dart' deferred as lib2; -main() async { - await lib2.loadLibrary(); - Expect.isFalse(lib2.method2() is int Function(int)); - Expect.isTrue(lib2.method2() is String Function(String)); - await lib1.loadLibrary(); - Expect.isTrue(lib1.method1() is int Function(int)); - Expect.isFalse(lib1.method1() is String Function(String)); +main() { + asyncTest(() async { + await lib2.loadLibrary(); + Expect.isFalse(lib2.method2() is int Function(int)); + Expect.isTrue(lib2.method2() is String Function(String)); + await lib1.loadLibrary(); + Expect.isTrue(lib1.method1() is int Function(int)); + Expect.isFalse(lib1.method1() is String Function(String)); + }); } diff --git a/tests/web_2/deferred_function_types3_test.dart b/tests/web_2/deferred_function_types3_test.dart index 10d69f47d8a..06968223f26 100644 --- a/tests/web_2/deferred_function_types3_test.dart +++ b/tests/web_2/deferred_function_types3_test.dart @@ -6,15 +6,18 @@ // dart2jsOptions=--strong +import 'package:async_helper/async_helper.dart'; import 'package:expect/expect.dart'; import 'deferred_function_types_lib1.dart' deferred as lib1; import 'deferred_function_types_lib2.dart' deferred as lib2; -main() async { - await lib1.loadLibrary(); - Expect.isTrue(lib1.method3() is Object Function(Null)); - Expect.isFalse(lib1.method3() is Object Function(Null, Null)); - await lib2.loadLibrary(); - Expect.isFalse(lib2.method4() is Object Function(Null)); - Expect.isTrue(lib2.method4() is Object Function(Null, Null)); +main() { + asyncTest(() async { + await lib1.loadLibrary(); + Expect.isTrue(lib1.method3() is Object Function(Null)); + Expect.isFalse(lib1.method3() is Object Function(Null, Null)); + await lib2.loadLibrary(); + Expect.isFalse(lib2.method4() is Object Function(Null)); + Expect.isTrue(lib2.method4() is Object Function(Null, Null)); + }); } diff --git a/tests/web_2/deferred_function_types4_test.dart b/tests/web_2/deferred_function_types4_test.dart index 27fedbc9330..3277948001c 100644 --- a/tests/web_2/deferred_function_types4_test.dart +++ b/tests/web_2/deferred_function_types4_test.dart @@ -6,15 +6,18 @@ // dart2jsOptions=--strong +import 'package:async_helper/async_helper.dart'; import 'package:expect/expect.dart'; import 'deferred_function_types_lib1.dart' deferred as lib1; import 'deferred_function_types_lib2.dart' deferred as lib2; -main() async { - await lib2.loadLibrary(); - Expect.isFalse(lib2.method4() is Object Function(Null)); - Expect.isTrue(lib2.method4() is Object Function(Null, Null)); - await lib1.loadLibrary(); - Expect.isTrue(lib1.method3() is Object Function(Null)); - Expect.isFalse(lib1.method3() is Object Function(Null, Null)); +main() { + asyncTest(() async { + await lib2.loadLibrary(); + Expect.isFalse(lib2.method4() is Object Function(Null)); + Expect.isTrue(lib2.method4() is Object Function(Null, Null)); + await lib1.loadLibrary(); + Expect.isTrue(lib1.method3() is Object Function(Null)); + Expect.isFalse(lib1.method3() is Object Function(Null, Null)); + }); } diff --git a/tests/web_2/deferred_function_types5_test.dart b/tests/web_2/deferred_function_types5_test.dart index 75b04e3285e..33fb076bcd8 100644 --- a/tests/web_2/deferred_function_types5_test.dart +++ b/tests/web_2/deferred_function_types5_test.dart @@ -6,15 +6,18 @@ // dart2jsOptions=--strong +import 'package:async_helper/async_helper.dart'; import 'package:expect/expect.dart'; import 'deferred_function_types_lib1.dart' deferred as lib1; import 'deferred_function_types_lib2.dart' deferred as lib2; -main() async { - await lib1.loadLibrary(); - Expect.isTrue(lib1.test3(lib1.method3())); - Expect.isFalse(lib1.method3() is Object Function(String)); - await lib2.loadLibrary(); - Expect.isFalse(lib2.method4() is Object Function(String, String)); - Expect.isTrue(lib2.test4(lib2.method4())); +main() { + asyncTest(() async { + await lib1.loadLibrary(); + Expect.isTrue(lib1.test3(lib1.method3())); + Expect.isFalse(lib1.method3() is Object Function(String)); + await lib2.loadLibrary(); + Expect.isFalse(lib2.method4() is Object Function(String, String)); + Expect.isTrue(lib2.test4(lib2.method4())); + }); } diff --git a/tests/web_2/deferred_function_types6_test.dart b/tests/web_2/deferred_function_types6_test.dart index 0a1b2a7921c..14105a984d8 100644 --- a/tests/web_2/deferred_function_types6_test.dart +++ b/tests/web_2/deferred_function_types6_test.dart @@ -6,15 +6,18 @@ // dart2jsOptions=--strong +import 'package:async_helper/async_helper.dart'; import 'package:expect/expect.dart'; import 'deferred_function_types_lib1.dart' deferred as lib1; import 'deferred_function_types_lib2.dart' deferred as lib2; -main() async { - await lib2.loadLibrary(); - Expect.isFalse(lib2.method4() is Object Function(String, String)); - Expect.isTrue(lib2.test4(lib2.method4())); - await lib1.loadLibrary(); - Expect.isTrue(lib1.test3(lib1.method3())); - Expect.isFalse(lib1.method3() is Object Function(String)); +main() { + asyncTest(() async { + await lib2.loadLibrary(); + Expect.isFalse(lib2.method4() is Object Function(String, String)); + Expect.isTrue(lib2.test4(lib2.method4())); + await lib1.loadLibrary(); + Expect.isTrue(lib1.test3(lib1.method3())); + Expect.isFalse(lib1.method3() is Object Function(String)); + }); } diff --git a/tests/web_2/deferred_function_types7_test.dart b/tests/web_2/deferred_function_types7_test.dart index ba16f2eecd9..38163a589bd 100644 --- a/tests/web_2/deferred_function_types7_test.dart +++ b/tests/web_2/deferred_function_types7_test.dart @@ -6,21 +6,24 @@ // dart2jsOptions=--strong +import 'package:async_helper/async_helper.dart'; import 'package:expect/expect.dart'; import 'deferred_function_types_lib1.dart' deferred as lib1; import 'deferred_function_types_lib2.dart' deferred as lib2; -main() async { - await lib1.loadLibrary(); - Expect.isTrue(lib1.method1() is int Function(int)); - Expect.isFalse(lib1.method1() is String Function(String)); - Expect.isTrue(lib1.method5 is Object Function(Null, String, int)); - Expect.isFalse(lib1.method5 is Object Function(Null, int, String)); - Expect.isTrue(lib1.test5(lib1.method5)); - await lib2.loadLibrary(); - Expect.isFalse(lib2.method2() is int Function(int)); - Expect.isTrue(lib2.method2() is String Function(String)); - Expect.isFalse(lib2.method6 is Object Function(Null, String, int)); - Expect.isTrue(lib2.method6 is Object Function(Null, int, String)); - Expect.isTrue(lib2.test6(lib2.method6)); +main() { + asyncTest(() async { + await lib1.loadLibrary(); + Expect.isTrue(lib1.method1() is int Function(int)); + Expect.isFalse(lib1.method1() is String Function(String)); + Expect.isTrue(lib1.method5 is Object Function(Null, String, int)); + Expect.isFalse(lib1.method5 is Object Function(Null, int, String)); + Expect.isTrue(lib1.test5(lib1.method5)); + await lib2.loadLibrary(); + Expect.isFalse(lib2.method2() is int Function(int)); + Expect.isTrue(lib2.method2() is String Function(String)); + Expect.isFalse(lib2.method6 is Object Function(Null, String, int)); + Expect.isTrue(lib2.method6 is Object Function(Null, int, String)); + Expect.isTrue(lib2.test6(lib2.method6)); + }); } diff --git a/tests/web_2/deferred_function_types8_test.dart b/tests/web_2/deferred_function_types8_test.dart index f6624a1dfbd..35abeb84f33 100644 --- a/tests/web_2/deferred_function_types8_test.dart +++ b/tests/web_2/deferred_function_types8_test.dart @@ -6,21 +6,24 @@ // dart2jsOptions=--strong +import 'package:async_helper/async_helper.dart'; import 'package:expect/expect.dart'; import 'deferred_function_types_lib1.dart' deferred as lib1; import 'deferred_function_types_lib2.dart' deferred as lib2; -main() async { - await lib2.loadLibrary(); - Expect.isFalse(lib2.method2() is int Function(int)); - Expect.isTrue(lib2.method2() is String Function(String)); - Expect.isFalse(lib2.method6 is Object Function(Null, String, int)); - Expect.isTrue(lib2.method6 is Object Function(Null, int, String)); - Expect.isTrue(lib2.test6(lib2.method6)); - await lib1.loadLibrary(); - Expect.isTrue(lib1.method1() is int Function(int)); - Expect.isFalse(lib1.method1() is String Function(String)); - Expect.isTrue(lib1.method5 is Object Function(Null, String, int)); - Expect.isFalse(lib1.method5 is Object Function(Null, int, String)); - Expect.isTrue(lib1.test5(lib1.method5)); +main() { + asyncTest(() async { + await lib2.loadLibrary(); + Expect.isFalse(lib2.method2() is int Function(int)); + Expect.isTrue(lib2.method2() is String Function(String)); + Expect.isFalse(lib2.method6 is Object Function(Null, String, int)); + Expect.isTrue(lib2.method6 is Object Function(Null, int, String)); + Expect.isTrue(lib2.test6(lib2.method6)); + await lib1.loadLibrary(); + Expect.isTrue(lib1.method1() is int Function(int)); + Expect.isFalse(lib1.method1() is String Function(String)); + Expect.isTrue(lib1.method5 is Object Function(Null, String, int)); + Expect.isFalse(lib1.method5 is Object Function(Null, int, String)); + Expect.isTrue(lib1.test5(lib1.method5)); + }); }