| 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"; | 5 import "package:expect/expect.dart"; |
| 6 | 6 |
| 7 topLevelMethod() => 't'; | 7 topLevelMethod() => 't'; |
| 8 | 8 |
| 9 const topLevelFieldForTopLevelMethod = topLevelMethod; | 9 const topLevelFieldForTopLevelMethod = topLevelMethod; |
| 10 const topLevelFieldForStaticMethod = A.staticMethod; | 10 const topLevelFieldForStaticMethod = A.staticMethod; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 Expect.equals('s', (const A.defaultStatic()).run()); | 29 Expect.equals('s', (const A.defaultStatic()).run()); |
| 30 Expect.equals('s', (const A.defaultStatic2()).run()); | 30 Expect.equals('s', (const A.defaultStatic2()).run()); |
| 31 Expect.equals('t', (new A.defaultTopLevel()).run()); | 31 Expect.equals('t', (new A.defaultTopLevel()).run()); |
| 32 Expect.equals('s', (new A.defaultStatic()).run()); | 32 Expect.equals('s', (new A.defaultStatic()).run()); |
| 33 Expect.equals('s', (new A.defaultStatic2()).run()); | 33 Expect.equals('s', (new A.defaultStatic2()).run()); |
| 34 Expect.equals('t', topLevelFieldForTopLevelMethod()); | 34 Expect.equals('t', topLevelFieldForTopLevelMethod()); |
| 35 Expect.equals('s', topLevelFieldForStaticMethod()); | 35 Expect.equals('s', topLevelFieldForStaticMethod()); |
| 36 Expect.equals('t', A.staticFieldForTopLevelMethod()); | 36 Expect.equals('t', A.staticFieldForTopLevelMethod()); |
| 37 Expect.equals('s', A.staticFieldForStaticMethod()); | 37 Expect.equals('s', A.staticFieldForStaticMethod()); |
| 38 | 38 |
| 39 var map = const {'t': topLevelMethod, 's': A.staticMethod }; | 39 var map = const {'t': topLevelMethod, 's': A.staticMethod}; |
| 40 Expect.equals('t', map['t']()); | 40 Expect.equals('t', map['t']()); |
| 41 Expect.equals('s', map['s']()); | 41 Expect.equals('s', map['s']()); |
| 42 } | 42 } |
| OLD | NEW |