| 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.synthetic_accessor_properties; | 5 library test.synthetic_accessor_properties; |
| 6 | 6 |
| 7 import 'dart:mirrors'; | 7 import 'dart:mirrors'; |
| 8 import 'package:expect/expect.dart'; | 8 import 'package:expect/expect.dart'; |
| 9 | 9 |
| 10 import 'stringify.dart'; | 10 import 'stringify.dart'; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 expect('Parameter(s(staticField) in s(staticField=), final,' | 60 expect('Parameter(s(staticField) in s(staticField=), final,' |
| 61 ' type = Class(s(bool) in s(dart.core), top-level))', pm); | 61 ' type = Class(s(bool) in s(dart.core), top-level))', pm); |
| 62 | 62 |
| 63 mm = cm.staticMembers[#finalStaticField]; | 63 mm = cm.staticMembers[#finalStaticField]; |
| 64 expect('Method(s(finalStaticField) in s(C), synthetic, static, getter)', mm); | 64 expect('Method(s(finalStaticField) in s(C), synthetic, static, getter)', mm); |
| 65 Expect.equals(reflectClass(int), mm.returnType); | 65 Expect.equals(reflectClass(int), mm.returnType); |
| 66 Expect.listEquals([], mm.parameters); | 66 Expect.listEquals([], mm.parameters); |
| 67 | 67 |
| 68 mm = cm.staticMembers[const Symbol('finalStaticField=')]; | 68 mm = cm.staticMembers[const Symbol('finalStaticField=')]; |
| 69 Expect.isNull(mm); | 69 Expect.isNull(mm); |
| 70 | |
| 71 | |
| 72 mm = lm.topLevelMembers[#topLevelField]; | |
| 73 expect('Method(s(topLevelField) in s(test.synthetic_accessor_properties),' | |
| 74 ' top-level, synthetic, static, getter)', mm); | |
| 75 Expect.equals(reflectClass(String), mm.returnType); | |
| 76 Expect.listEquals([], mm.parameters); | |
| 77 | |
| 78 mm = lm.topLevelMembers[const Symbol('topLevelField=')]; | |
| 79 expect('Method(s(topLevelField=) in s(test.synthetic_accessor_properties),' | |
| 80 ' top-level, synthetic, static, setter)', mm); | |
| 81 Expect.equals(reflectClass(String), mm.returnType); | |
| 82 pm = mm.parameters.single; | |
| 83 expect('Parameter(s(topLevelField) in s(topLevelField=), final,' | |
| 84 ' type = Class(s(String) in s(dart.core), top-level))', pm); | |
| 85 | |
| 86 mm = lm.topLevelMembers[#finalTopLevelField]; | |
| 87 expect('Method(s(finalTopLevelField) in s(test.synthetic_accessor_properties)' | |
| 88 ', top-level, synthetic, static, getter)', mm); | |
| 89 Expect.equals(reflectClass(double), mm.returnType); | |
| 90 Expect.listEquals([], mm.parameters); | |
| 91 | |
| 92 mm = lm.topLevelMembers[const Symbol('finalTopLevelField=')]; | |
| 93 Expect.isNull(mm); | |
| 94 | |
| 95 return; /// 01: ok | |
| 96 | |
| 97 mm = lm.topLevelMembers[#C]; | |
| 98 expect('Method(s(C) in s(test.synthetic_accessor_properties),' | |
| 99 ' top-level, synthetic, static, getter)', mm); | |
| 100 Expect.equals(reflectClass(Type), mm.returnType); | |
| 101 Expect.listEquals([], mm.parameters); | |
| 102 | |
| 103 mm = lm.topLevelMembers[const Symbol('C=')]; | |
| 104 Expect.isNull(mm); | |
| 105 } | 70 } |
| OLD | NEW |