OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // Check that compile-time evaluation of constants is consistent with runtime | 5 // Check that compile-time evaluation of constants is consistent with runtime |
6 // evaluation. | 6 // evaluation. |
7 | 7 |
8 import 'dart:mirrors'; | 8 import 'dart:mirrors'; |
9 | 9 |
10 import 'package:expect/expect.dart'; | 10 import 'package:expect/expect.dart'; |
(...skipping 20 matching lines...) Expand all Loading... |
31 Expect.equals(top_const, top_final); | 31 Expect.equals(top_const, top_final); |
32 Expect.equals(top_final, top_var); | 32 Expect.equals(top_final, top_var); |
33 Expect.equals(top_var, static_const); | 33 Expect.equals(top_var, static_const); |
34 Expect.equals(static_const, static_final); | 34 Expect.equals(static_const, static_final); |
35 Expect.equals(static_final, static_var); | 35 Expect.equals(static_final, static_var); |
36 Expect.equals(static_var, instance_final); | 36 Expect.equals(static_var, instance_final); |
37 Expect.equals(instance_final, instance_var); | 37 Expect.equals(instance_final, instance_var); |
38 Expect.equals(instance_var, local_const); | 38 Expect.equals(instance_var, local_const); |
39 Expect.equals(local_const, local_final); | 39 Expect.equals(local_const, local_final); |
40 Expect.equals(local_final, local_var); | 40 Expect.equals(local_final, local_var); |
41 var metadata = reflectClass(C).metadata[0].reflectee; /// 01: ok | 41 var metadata = reflectClass(C).metadata[0].reflectee; //# 01: ok |
42 Expect.equals(top_const, metadata); /// 01: continued | 42 Expect.equals(top_const, metadata); //# 01: continued |
43 Expect.equals(local_var, metadata); /// 01: continued | 43 Expect.equals(local_var, metadata); //# 01: continued |
44 } | 44 } |
45 } | 45 } |
46 | 46 |
47 void main() { | 47 void main() { |
48 new C().test(); | 48 new C().test(); |
49 } | 49 } |
OLD | NEW |