| 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 // This tests uses the multi-test "ok" feature: | 5 // This tests uses the multi-test "ok" feature: |
| 6 // none: Trimmed behaviour. Passing on the VM. | 6 // none: Trimmed behaviour. Passing on the VM. |
| 7 // 01: Trimmed version for dart2js. | 7 // 01: Trimmed version for dart2js. |
| 8 // 02: Full version passing in the VM. | 8 // 02: Full version passing in the VM. |
| 9 // | 9 // |
| 10 // TODO(rmacnak,ahe): Remove multi-test when VM and dart2js are on par. | 10 // TODO(rmacnak,ahe): Remove multi-test when VM and dart2js are on par. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 {'reflect(3+4)' : reflect(3+4), | 94 {'reflect(3+4)' : reflect(3+4), |
| 95 'reflect(6+1)' : reflect(6+1)}, | 95 'reflect(6+1)' : reflect(6+1)}, |
| 96 | 96 |
| 97 {'reflect("foo")' : reflect("foo"), | 97 {'reflect("foo")' : reflect("foo"), |
| 98 'reflect("foo"), again' : reflect("foo")}, | 98 'reflect("foo"), again' : reflect("foo")}, |
| 99 | 99 |
| 100 {'currentMirrorSystem().voidType' : currentMirrorSystem().voidType}, /// 01
: ok | 100 {'currentMirrorSystem().voidType' : currentMirrorSystem().voidType}, /// 01
: ok |
| 101 | 101 |
| 102 {'currentMirrorSystem().voidType' : currentMirrorSystem().voidType, /// 02
: ok | 102 {'currentMirrorSystem().voidType' : currentMirrorSystem().voidType, /// 02
: ok |
| 103 'thisLibrary.functions[#subroutine].returnType' : /// 02
: ok | 103 'thisLibrary.declarations[#subroutine].returnType' : ///
02: ok |
| 104 thisLibrary.functions[#subroutine].returnType}, /// 02: ok | 104 (thisLibrary.declarations[#subroutine] as MethodMirror).returnType},
/// 02: ok |
| 105 | 105 |
| 106 {'currentMirrorSystem().dynamicType' : currentMirrorSystem().dynamicType, | 106 {'currentMirrorSystem().dynamicType' : currentMirrorSystem().dynamicType, |
| 107 'thisLibrary.functions[#main].returnType' : | 107 'thisLibrary.declarations[#main].returnType' : |
| 108 thisLibrary.functions[#main].returnType}, | 108 (thisLibrary.declarations[#main] as MethodMirror).returnType}, |
| 109 | 109 |
| 110 {'reflectClass(A)' : reflectClass(A), | 110 {'reflectClass(A)' : reflectClass(A), |
| 111 'thisLibrary.classes[#A]' : thisLibrary.classes[#A], | 111 'thisLibrary.declarations[#A]' : thisLibrary.declarations[#A], |
| 112 'reflect(new A<int>()).type.originalDeclaration' : | 112 'reflect(new A<int>()).type.originalDeclaration' : |
| 113 reflect(new A<int>()).type.originalDeclaration}, | 113 reflect(new A<int>()).type.originalDeclaration}, |
| 114 | 114 |
| 115 {'reflectClass(B).superclass' : reflectClass(B).superclass, /// 02: ok | 115 {'reflectClass(B).superclass' : reflectClass(B).superclass, /// 02: ok |
| 116 'reflect(new A<int>()).type' : reflect(new A<int>()).type}, /// 02: ok | 116 'reflect(new A<int>()).type' : reflect(new A<int>()).type}, /// 02: ok |
| 117 | 117 |
| 118 {'reflectClass(B)' : reflectClass(B), | 118 {'reflectClass(B)' : reflectClass(B), |
| 119 'thisLibrary.classes[#B]' : thisLibrary.classes[#B], | 119 'thisLibrary.declarations[#B]' : thisLibrary.declarations[#B], |
| 120 'reflect(new B()).type' : reflect(new B()).type}, | 120 'reflect(new B()).type' : reflect(new B()).type}, |
| 121 | 121 |
| 122 {'reflectClass(BadEqualityHash).methods[#==]' /// 02: ok | 122 {'reflectClass(BadEqualityHash).declarations[#==]' /// 02: ok |
| 123 : reflectClass(BadEqualityHash).methods[#==], /// 02: ok | 123 : reflectClass(BadEqualityHash).declarations[#==], /// 02: ok |
| 124 'reflect(new BadEqualityHash()).type.methods[#==]' /// 02: ok | 124 'reflect(new BadEqualityHash()).type.declarations[#==]' /// 02: ok |
| 125 : reflect(new BadEqualityHash()).type.methods[#==]}, /// 02: ok | 125 : reflect(new BadEqualityHash()).type.declarations[#==]}, /// 02: ok |
| 126 | 126 |
| 127 {'reflectClass(BadEqualityHash).methods[#==].parameters[0]' /// 02: ok | 127 {'reflectClass(BadEqualityHash).declarations[#==].parameters[0]' /// 02: ok |
| 128 : reflectClass(BadEqualityHash).methods[#==].parameters[0], /// 02: ok | 128 : (reflectClass(BadEqualityHash).declarations[#==] as MethodMirror).para
meters[0], /// 02: ok |
| 129 'reflect(new BadEqualityHash()).type.methods[#==].parameters[0]' /// 02: o
k | 129 'reflect(new BadEqualityHash()).type.declarations[#==].parameters[0]' ///
02: ok |
| 130 : reflect(new BadEqualityHash()).type.methods[#==].parameters[0]}, ///
02: ok | 130 : (reflect(new BadEqualityHash()).type.declarations[#==] as MethodMirror
).parameters[0]}, /// 02: ok |
| 131 | 131 |
| 132 {'reflectClass(BadEqualityHash).variables[#count]' /// 02: ok | 132 {'reflectClass(BadEqualityHash).declarations[#count]' /// 02: ok |
| 133 : reflectClass(BadEqualityHash).variables[#count], /// 02: ok | 133 : reflectClass(BadEqualityHash).declarations[#count], /// 02: ok |
| 134 'reflect(new BadEqualityHash()).type.variables[#count]' /// 02: ok | 134 'reflect(new BadEqualityHash()).type.declarations[#count]' /// 02: ok |
| 135 : reflect(new BadEqualityHash()).type.variables[#count]}, /// 02: ok | 135 : reflect(new BadEqualityHash()).type.declarations[#count]}, /// 02: ok |
| 136 | 136 |
| 137 {'reflectType(Predicate)' : reflectType(Predicate), /// 02: ok | 137 {'reflectType(Predicate)' : reflectType(Predicate), /// 02: ok |
| 138 'thisLibrary.variables[#somePredicate].type' /// 02: ok | 138 'thisLibrary.declarations[#somePredicate].type' /// 02: ok |
| 139 : thisLibrary.variables[#somePredicate].type}, /// 02: ok | 139 : (thisLibrary.declarations[#somePredicate] as VariableMirror).type}, /
// 02: ok |
| 140 | 140 |
| 141 {'reflectType(Predicate).referent' : (reflectType(Predicate) as TypedefMirro
r).referent, /// 02: ok | 141 {'reflectType(Predicate).referent' : (reflectType(Predicate) as TypedefMirro
r).referent, /// 02: ok |
| 142 'thisLibrary.variables[#somePredicate].type.referent' /// 02: ok | 142 'thisLibrary.declarations[#somePredicate].type.referent' /// 02: ok |
| 143 : (thisLibrary.variables[#somePredicate].type as TypedefMirror).referent
}, /// 02: ok | 143 : ((thisLibrary.declarations[#somePredicate] as VariableMirror).type as
TypedefMirror).referent}, /// 02: ok |
| 144 | 144 |
| 145 {'reflectClass(A).typeVariables.single' /// 02: ok | 145 {'reflectClass(A).typeVariables.single' /// 02: ok |
| 146 : reflectClass(A).typeVariables.single, /// 02: ok | 146 : reflectClass(A).typeVariables.single, /// 02: ok |
| 147 'reflect(new A<int>()).type.originalDeclaration.typeVariables.single' ///
02: ok | 147 'reflect(new A<int>()).type.originalDeclaration.typeVariables.single' ///
02: ok |
| 148 : reflect(new A<int>()).type.originalDeclaration.typeVariables.single},
/// 02: ok | 148 : reflect(new A<int>()).type.originalDeclaration.typeVariables.single},
/// 02: ok |
| 149 | 149 |
| 150 {'currentMirrorSystem()' : currentMirrorSystem()}, | 150 {'currentMirrorSystem()' : currentMirrorSystem()}, |
| 151 | 151 |
| 152 {'currentMirrorSystem().isolate' : currentMirrorSystem().isolate}, | 152 {'currentMirrorSystem().isolate' : currentMirrorSystem().isolate}, |
| 153 | 153 |
| 154 {'thisLibrary' : thisLibrary, | 154 {'thisLibrary' : thisLibrary, |
| 155 'reflectClass(A).owner' : reflectClass(A).owner, | 155 'reflectClass(A).owner' : reflectClass(A).owner, |
| 156 'reflectClass(B).owner' : reflectClass(B).owner, | 156 'reflectClass(B).owner' : reflectClass(B).owner, |
| 157 'reflect(new A()).type.owner' : reflect(new A()).type.owner, | 157 'reflect(new A()).type.owner' : reflect(new A()).type.owner, |
| 158 'reflect(new B()).type.owner' : reflect(new B()).type.owner}, | 158 'reflect(new B()).type.owner' : reflect(new B()).type.owner}, |
| 159 ]); | 159 ]); |
| 160 } | 160 } |
| OLD | NEW |