Index: tests/language_strong/tearoff_dynamic_test.dart |
diff --git a/tests/language_strong/tearoff_dynamic_test.dart b/tests/language_strong/tearoff_dynamic_test.dart |
index 9d324d6a6347cccaa9d6e179da32766e4376d23b..e23c22fc493d09ab14e32bdac5903831391748b6 100644 |
--- a/tests/language_strong/tearoff_dynamic_test.dart |
+++ b/tests/language_strong/tearoff_dynamic_test.dart |
@@ -5,6 +5,7 @@ import 'package:expect/expect.dart'; |
class Foo { |
dynamic method(int x) {} |
+ dynamic method2(int x) {} |
} |
main() { |
@@ -15,4 +16,14 @@ main() { |
dynamic dynamicMethod2 = (foo as dynamic).method; |
Expect.throws(() => dynamicMethod2(2.5)); |
+ |
+ Expect.equals(dynamicMethod1, dynamicMethod1); |
+ Expect.equals(dynamicMethod1, dynamicMethod2); |
+ Expect.equals(dynamicMethod1, foo.method); |
+ Expect.equals(foo.method2, (foo as dynamic).method2); |
+ |
+ Expect.notEquals(dynamicMethod1, new Foo().method); |
+ Expect.notEquals(dynamicMethod1, (new Foo() as dynamic).method); |
+ Expect.notEquals(dynamicMethod1, foo.method2); |
+ Expect.notEquals(dynamicMethod1, (foo as dynamic).method2); |
} |