| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 {'reflect(3.5+4.5)' : reflect(3.5+4.5), | 91 {'reflect(3.5+4.5)' : reflect(3.5+4.5), |
| 92 'reflect(6.5+1.5)' : reflect(6.5+1.5)}, | 92 'reflect(6.5+1.5)' : reflect(6.5+1.5)}, |
| 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, |
| 101 | 101 'thisLibrary.declarations[#subroutine].returnType' : |
| 102 {'currentMirrorSystem().voidType' : currentMirrorSystem().voidType, /// 02
: ok | 102 (thisLibrary.declarations[#subroutine] as MethodMirror).returnType}, |
| 103 'thisLibrary.declarations[#subroutine].returnType' : ///
02: ok | |
| 104 (thisLibrary.declarations[#subroutine] as MethodMirror).returnType},
/// 02: ok | |
| 105 | 103 |
| 106 {'currentMirrorSystem().dynamicType' : currentMirrorSystem().dynamicType, | 104 {'currentMirrorSystem().dynamicType' : currentMirrorSystem().dynamicType, |
| 107 'thisLibrary.declarations[#main].returnType' : | 105 'thisLibrary.declarations[#main].returnType' : |
| 108 (thisLibrary.declarations[#main] as MethodMirror).returnType}, | 106 (thisLibrary.declarations[#main] as MethodMirror).returnType}, |
| 109 | 107 |
| 110 {'reflectClass(A)' : reflectClass(A), | 108 {'reflectClass(A)' : reflectClass(A), |
| 111 'thisLibrary.declarations[#A]' : thisLibrary.declarations[#A], | 109 'thisLibrary.declarations[#A]' : thisLibrary.declarations[#A], |
| 112 'reflect(new A<int>()).type.originalDeclaration' : | 110 'reflect(new A<int>()).type.originalDeclaration' : |
| 113 reflect(new A<int>()).type.originalDeclaration}, | 111 reflect(new A<int>()).type.originalDeclaration}, |
| 114 | 112 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 129 declarations[#==] as MethodMirror).parameters[0], | 127 declarations[#==] as MethodMirror).parameters[0], |
| 130 'reflect(new BadEqualityHash()).type.declarations[#==].parameters[0]' | 128 'reflect(new BadEqualityHash()).type.declarations[#==].parameters[0]' |
| 131 : (reflect(new BadEqualityHash()).type. | 129 : (reflect(new BadEqualityHash()).type. |
| 132 declarations[#==] as MethodMirror).parameters[0]}, | 130 declarations[#==] as MethodMirror).parameters[0]}, |
| 133 | 131 |
| 134 {'reflectClass(BadEqualityHash).declarations[#count]' | 132 {'reflectClass(BadEqualityHash).declarations[#count]' |
| 135 : reflectClass(BadEqualityHash).declarations[#count], | 133 : reflectClass(BadEqualityHash).declarations[#count], |
| 136 'reflect(new BadEqualityHash()).type.declarations[#count]' | 134 'reflect(new BadEqualityHash()).type.declarations[#count]' |
| 137 : reflect(new BadEqualityHash()).type.declarations[#count]}, | 135 : reflect(new BadEqualityHash()).type.declarations[#count]}, |
| 138 | 136 |
| 139 {'reflectType(Predicate)' : reflectType(Predicate), /// 02: ok | 137 {'reflectType(Predicate)' : reflectType(Predicate), |
| 140 'thisLibrary.declarations[#somePredicate].type' /// 02: ok | 138 'thisLibrary.declarations[#somePredicate].type' |
| 141 : (thisLibrary.declarations[#somePredicate] as VariableMirror).type}, /
// 02: ok | 139 : (thisLibrary.declarations[#somePredicate] as VariableMirror).type}, |
| 142 | 140 |
| 143 {'reflectType(Predicate).referent' : (reflectType(Predicate) as TypedefMirro
r).referent, /// 02: ok | 141 {'reflectType(Predicate).referent' : (reflectType(Predicate) as TypedefMirro
r).referent, |
| 144 'thisLibrary.declarations[#somePredicate].type.referent' /// 02: ok | 142 'thisLibrary.declarations[#somePredicate].type.referent' |
| 145 : ((thisLibrary.declarations[#somePredicate] as VariableMirror).type as
TypedefMirror).referent}, /// 02: ok | 143 : ((thisLibrary.declarations[#somePredicate] as VariableMirror).type as
TypedefMirror).referent}, |
| 146 | 144 |
| 147 {'reflectClass(A).typeVariables.single' | 145 {'reflectClass(A).typeVariables.single' |
| 148 : reflectClass(A).typeVariables.single, | 146 : reflectClass(A).typeVariables.single, |
| 149 'reflect(new A<int>()).type.originalDeclaration.typeVariables.single' | 147 'reflect(new A<int>()).type.originalDeclaration.typeVariables.single' |
| 150 : reflect(new A<int>()).type.originalDeclaration.typeVariables.single}, | 148 : reflect(new A<int>()).type.originalDeclaration.typeVariables.single}, |
| 151 | 149 |
| 152 {'currentMirrorSystem()' : currentMirrorSystem()}, | 150 {'currentMirrorSystem()' : currentMirrorSystem()}, |
| 153 | 151 |
| 154 {'currentMirrorSystem().isolate' : currentMirrorSystem().isolate}, | 152 {'currentMirrorSystem().isolate' : currentMirrorSystem().isolate}, |
| 155 | 153 |
| 156 {'thisLibrary' : thisLibrary, | 154 {'thisLibrary' : thisLibrary, |
| 157 'reflectClass(A).owner' : reflectClass(A).owner, | 155 'reflectClass(A).owner' : reflectClass(A).owner, |
| 158 'reflectClass(B).owner' : reflectClass(B).owner, | 156 'reflectClass(B).owner' : reflectClass(B).owner, |
| 159 'reflect(new A()).type.owner' : reflect(new A()).type.owner, | 157 'reflect(new A()).type.owner' : reflect(new A()).type.owner, |
| 160 'reflect(new B()).type.owner' : reflect(new B()).type.owner}, | 158 'reflect(new B()).type.owner' : reflect(new B()).type.owner}, |
| 161 ]); | 159 ]); |
| 162 } | 160 } |
| OLD | NEW |