| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import "package:expect/expect.dart"; | |
| 6 | |
| 7 class NoSuchMethodInfo { | 5 class NoSuchMethodInfo { |
| 8 Object receiver; | 6 Object receiver; |
| 9 String name; | 7 String name; |
| 10 List args; | 8 List args; |
| 11 NoSuchMethodInfo(Object r, String m, List a) | 9 NoSuchMethodInfo(Object r, String m, List a) |
| 12 : receiver = r, name = m, args = a; | 10 : receiver = r, name = m, args = a; |
| 13 } | 11 } |
| 14 | 12 |
| 15 class A { | 13 class A { |
| 16 noSuchMethod(InvocationMirror invocation) { | 14 noSuchMethod(InvocationMirror invocation) { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 45 Expect.isTrue(info.args.length == 0); | 43 Expect.isTrue(info.args.length == 0); |
| 46 Expect.isTrue(identical(info.receiver, a)); | 44 Expect.isTrue(identical(info.receiver, a)); |
| 47 | 45 |
| 48 a.bar = 2; | 46 a.bar = 2; |
| 49 info = topLevelInfo; | 47 info = topLevelInfo; |
| 50 Expect.equals('bar', info.name); | 48 Expect.equals('bar', info.name); |
| 51 Expect.isTrue(info.args.length == 1); | 49 Expect.isTrue(info.args.length == 1); |
| 52 Expect.isTrue(info.args[0] == 2); | 50 Expect.isTrue(info.args[0] == 2); |
| 53 Expect.isTrue(identical(info.receiver, a)); | 51 Expect.isTrue(identical(info.receiver, a)); |
| 54 } | 52 } |
| OLD | NEW |