| 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 // Dart test program for testing setting/getting/initializing static fields. | 4 // Dart test program for testing setting/getting/initializing static fields. |
| 5 | 5 |
| 6 import "package:expect/expect.dart"; | |
| 7 | |
| 8 class First { | 6 class First { |
| 9 First() {} | 7 First() {} |
| 10 static var a; | 8 static var a; |
| 11 static var b; | 9 static var b; |
| 12 static const int c = 1; | 10 static const int c = 1; |
| 13 static setValues() { | 11 static setValues() { |
| 14 a = 24; | 12 a = 24; |
| 15 b = 10; | 13 b = 10; |
| 16 return a + b + c; | 14 return a + b + c; |
| 17 } | 15 } |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } | 106 } |
| 109 | 107 |
| 110 main() { | 108 main() { |
| 111 StaticFieldTest.testMain(); | 109 StaticFieldTest.testMain(); |
| 112 InitializerTest.testStaticFieldInitialization(); | 110 InitializerTest.testStaticFieldInitialization(); |
| 113 new StaticField1RunNegativeTest().testMain(); | 111 new StaticField1RunNegativeTest().testMain(); |
| 114 new StaticField1aRunNegativeTest().testMain(); | 112 new StaticField1aRunNegativeTest().testMain(); |
| 115 new StaticField2RunNegativeTest().testMain(); | 113 new StaticField2RunNegativeTest().testMain(); |
| 116 new StaticField2aRunNegativeTest().testMain(); | 114 new StaticField2aRunNegativeTest().testMain(); |
| 117 } | 115 } |
| OLD | NEW |