Chromium Code Reviews| Index: tests/language/no_such_method_dispatcher_test.dart |
| =================================================================== |
| --- tests/language/no_such_method_dispatcher_test.dart (revision 24285) |
| +++ tests/language/no_such_method_dispatcher_test.dart (working copy) |
| @@ -10,14 +10,22 @@ |
| noSuchMethod(m) { |
| return 123; |
| } |
| + bar(x) => x + 1; |
| } |
| class B extends A { } |
| main() { |
| + var a = new A(); |
| + for (var i = 0; i < 5000; ++i) Expect.equals(123, a.foo()); |
|
srdjan
2013/06/24 16:23:27
That may not trigger optimization. Safer and faste
Florian Schneider
2013/06/24 17:19:15
Done.
|
| + Expect.throws(() => (a.foo)()); |
| + Expect.equals("123", (a.foo).toString()); |
| + |
| var b = new B(); |
| - for (var i = 0; i < 5000; ++i) Expect.equals(123, b.foo()); |
| - Expect.throws(() => (b.foo)()); |
| - Expect.equals("123", (b.foo).toString()); |
| + for (var i = 0; i < 5000; ++i) { |
|
srdjan
2013/06/24 16:23:27
ditto.
Florian Schneider
2013/06/24 17:19:15
Done.
|
| + Expect.equals(2, b.bar(1)); |
| + Expect.equals(123, b.bar()); |
| + Expect.equals(2, b.bar(1)); |
| + } |
| } |