| 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 import "package:expect/expect.dart"; | |
| 6 | |
| 7 class ParameterInitializerTest { | 5 class ParameterInitializerTest { |
| 8 | 6 |
| 9 static testMain() { | 7 static testMain() { |
| 10 var obj = new Foo.untyped(1); | 8 var obj = new Foo.untyped(1); |
| 11 Expect.equals(1, obj.x); | 9 Expect.equals(1, obj.x); |
| 12 | 10 |
| 13 obj = new Foo.supertype(9); | 11 obj = new Foo.supertype(9); |
| 14 Expect.equals(9, obj.x); | 12 Expect.equals(9, obj.x); |
| 15 | 13 |
| 16 obj = new Foo.subtype(7); | 14 obj = new Foo.subtype(7); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 Expect.equals(x_, 1); | 74 Expect.equals(x_, 1); |
| 77 | 75 |
| 78 // There is no way to get to the field in Foo. | 76 // There is no way to get to the field in Foo. |
| 79 Expect.equals(super.x, 1); | 77 Expect.equals(super.x, 1); |
| 80 } | 78 } |
| 81 } | 79 } |
| 82 | 80 |
| 83 main() { | 81 main() { |
| 84 ParameterInitializerTest.testMain(); | 82 ParameterInitializerTest.testMain(); |
| 85 } | 83 } |
| OLD | NEW |