OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 class BaseClass { | 5 class BaseClass { |
6 var foo; | 6 var foo; |
7 BaseClass() { foo = 0; } | 7 BaseClass() { foo = 0; } |
8 toString() => "BaseClass"; | 8 toString() => "BaseClass"; |
9 } | 9 } |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 Expect.equals(true, c1 is !ExtendsClass); | 47 Expect.equals(true, c1 is !ExtendsClass); |
48 Expect.equals(true, c2 is BaseClass); | 48 Expect.equals(true, c2 is BaseClass); |
49 Expect.equals(true, c2 is ExtendsClass); | 49 Expect.equals(true, c2 is ExtendsClass); |
50 Expect.equals(true, c2 is !ImplementsClass); | 50 Expect.equals(true, c2 is !ImplementsClass); |
51 Expect.equals("BaseClass", "${new BaseClass()}"); | 51 Expect.equals("BaseClass", "${new BaseClass()}"); |
52 | 52 |
53 // Verify we don't inherit toString from BaseClass | 53 // Verify we don't inherit toString from BaseClass |
54 Expect.notEquals("BaseClass", "${c1}"); | 54 Expect.notEquals("BaseClass", "${c1}"); |
55 Expect.notEquals("BaseClass", "${c2}"); | 55 Expect.notEquals("BaseClass", "${c2}"); |
56 } | 56 } |
OLD | NEW |