| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library test.invoke_call_through_getter; | 5 library test.invoke_call_through_getter; |
| 6 | 6 |
| 7 import 'dart:mirrors'; | 7 import 'dart:mirrors'; |
| 8 | 8 |
| 9 import 'package:expect/expect.dart'; | 9 import 'package:expect/expect.dart'; |
| 10 | 10 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 lm.invoke(#closure, [9, 10]).reflectee); | 123 lm.invoke(#closure, [9, 10]).reflectee); |
| 124 Expect.equals('3 11 12 13 null', | 124 Expect.equals('3 11 12 13 null', |
| 125 lm.invoke(#closureOpt, [11, 12, 13]).reflectee); | 125 lm.invoke(#closureOpt, [11, 12, 13]).reflectee); |
| 126 Expect.equals('4 14 15 null 16', | 126 Expect.equals('4 14 15 null 16', |
| 127 lm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); | 127 lm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); |
| 128 Expect.throws(() => lm.invoke(#closure, ['wrong arity']), | 128 Expect.throws(() => lm.invoke(#closure, ['wrong arity']), |
| 129 (e) => e is NoSuchMethodError); | 129 (e) => e is NoSuchMethodError); |
| 130 } | 130 } |
| 131 | 131 |
| 132 main() { | 132 main() { |
| 133 testInstanceBase(); | 133 // Do not access the getters/closures at the base level in this variant. |
| 134 //testInstanceBase(); |
| 134 testInstanceReflective(); | 135 testInstanceReflective(); |
| 135 testClassBase(); | 136 //testClassBase(); |
| 136 testClassReflective(); | 137 testClassReflective(); |
| 137 testLibraryBase(); | 138 //testLibraryBase(); |
| 138 testLibraryReflective(); | 139 testLibraryReflective(); |
| 139 } | 140 } |
| OLD | NEW |