OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
6 import "inheritance_chain_lib.dart"; | 6 import "inheritance_chain_lib.dart"; |
7 | 7 |
8 class A extends B { | 8 class A extends B { |
9 get id => "A"; | 9 get id => "A"; |
10 get length => 1; | 10 get length => 1; |
11 } | 11 } |
12 | 12 |
13 class C extends D { | 13 class C extends D { |
14 get id => "C"; | 14 get id => "C"; |
15 get length => 3; | 15 get length => 3; |
16 } | 16 } |
17 | 17 |
18 class X extends W { | 18 class X extends W { |
19 get id => "X"; | 19 get id => "X"; |
20 get length => -3; | 20 get length => -3; |
21 } | 21 } |
22 | 22 |
23 class Z extends Y { | 23 class Z extends Y { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 Expect.isTrue(o is W); | 93 Expect.isTrue(o is W); |
94 o = instances[7]; | 94 o = instances[7]; |
95 Expect.equals("Z", o.id); | 95 Expect.equals("Z", o.id); |
96 Expect.equals(-1, o.length); | 96 Expect.equals(-1, o.length); |
97 Expect.isTrue(o is Z); | 97 Expect.isTrue(o is Z); |
98 Expect.isTrue(o is Y); | 98 Expect.isTrue(o is Y); |
99 Expect.isTrue(o is X); | 99 Expect.isTrue(o is X); |
100 Expect.isTrue(o is W); | 100 Expect.isTrue(o is W); |
101 o = instances[8]; | 101 o = instances[8]; |
102 Expect.equals(0, o.length); | 102 Expect.equals(0, o.length); |
103 } | 103 } |
OLD | NEW |