Chromium Code Reviews| 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 // Multitest so we exerice the paths where are and are not previously accessed |
|
floitsch
2014/03/13 12:06:43
exercise
| |
| 134 // at the base level. | |
| 135 testInstanceBase(); /// 01: ok | |
| 134 testInstanceReflective(); | 136 testInstanceReflective(); |
| 135 testClassBase(); | 137 testClassBase(); /// 01: ok |
| 136 testClassReflective(); | 138 testClassReflective(); |
| 137 testLibraryBase(); | 139 testLibraryBase(); /// 01: ok |
| 138 testLibraryReflective(); | 140 testLibraryReflective(); |
| 139 } | 141 } |
| OLD | NEW |