| 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: | |
| 6 // none: Trimmed behaviour. Passing on the VM. | |
| 7 // 01: Trimmed version for dart2js. | |
| 8 // 02: Full version passing in the VM. | |
| 9 // | |
| 10 // TODO(rmacnak,ahe): Remove multi-test when VM and dart2js are on par. | |
| 11 | |
| 12 library test.class_equality_test; | 5 library test.class_equality_test; |
| 13 | 6 |
| 7 @MirrorsUsed(targets: "test.class_equality_test") |
| 14 import 'dart:mirrors'; | 8 import 'dart:mirrors'; |
| 15 | 9 |
| 16 import 'package:expect/expect.dart'; | 10 import 'package:expect/expect.dart'; |
| 17 | 11 |
| 18 class A<T> {} | 12 class A<T> {} |
| 19 class B extends A<int> {} | 13 class B extends A<int> {} |
| 20 | 14 |
| 21 class BadEqualityHash { | 15 class BadEqualityHash { |
| 22 int count = 0; | 16 int count = 0; |
| 23 bool operator ==(other) => true; | 17 bool operator ==(other) => true; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 145 |
| 152 {'currentMirrorSystem().isolate' : currentMirrorSystem().isolate}, | 146 {'currentMirrorSystem().isolate' : currentMirrorSystem().isolate}, |
| 153 | 147 |
| 154 {'thisLibrary' : thisLibrary, | 148 {'thisLibrary' : thisLibrary, |
| 155 'reflectClass(A).owner' : reflectClass(A).owner, | 149 'reflectClass(A).owner' : reflectClass(A).owner, |
| 156 'reflectClass(B).owner' : reflectClass(B).owner, | 150 'reflectClass(B).owner' : reflectClass(B).owner, |
| 157 'reflect(new A()).type.owner' : reflect(new A()).type.owner, | 151 'reflect(new A()).type.owner' : reflect(new A()).type.owner, |
| 158 'reflect(new B()).type.owner' : reflect(new B()).type.owner}, | 152 'reflect(new B()).type.owner' : reflect(new B()).type.owner}, |
| 159 ]); | 153 ]); |
| 160 } | 154 } |
| OLD | NEW |