OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 // Tests static and instance fields initialization. | 5 // Tests static and instance fields initialization. |
6 class DefaultInitTest { | 6 class DefaultInitTest { |
7 static testMain() { | 7 static testMain() { |
8 Expect.equals(0, A.a); | 8 Expect.equals(0, A.a); |
9 Expect.equals(2, A.b); | 9 Expect.equals(2, A.b); |
10 Expect.equals(null, A.c); | 10 Expect.equals(null, A.c); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 } | 55 } |
56 | 56 |
57 class D { | 57 class D { |
58 const D(): this.z = 3; | 58 const D(): this.z = 3; |
59 final int z; | 59 final int z; |
60 } | 60 } |
61 | 61 |
62 main() { | 62 main() { |
63 DefaultInitTest.testMain(); | 63 DefaultInitTest.testMain(); |
64 } | 64 } |
OLD | NEW |