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