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 // Dart test program for testing static const fields. | 4 // Dart test program for testing static const fields. |
5 | 5 |
| 6 import "package:expect/expect.dart"; |
| 7 |
6 abstract class Spain { | 8 abstract class Spain { |
7 static const AG = "Antoni Gaudi"; | 9 static const AG = "Antoni Gaudi"; |
8 static const SD = "Salvador Dali"; | 10 static const SD = "Salvador Dali"; |
9 } | 11 } |
10 | 12 |
11 abstract class Switzerland { | 13 abstract class Switzerland { |
12 static const AG = "Alberto Giacometti"; | 14 static const AG = "Alberto Giacometti"; |
13 static const LC = "Le Corbusier"; | 15 static const LC = "Le Corbusier"; |
14 } | 16 } |
15 | 17 |
(...skipping 29 matching lines...) Expand all Loading... |
45 Expect.equals(true, Spain.SD == "Salvador Dali"); | 47 Expect.equals(true, Spain.SD == "Salvador Dali"); |
46 Expect.equals(true, A.artist2 == "Alberto Giacometti"); | 48 Expect.equals(true, A.artist2 == "Alberto Giacometti"); |
47 Expect.equals(true, A.architect1 == "Antoni Gaudi"); | 49 Expect.equals(true, A.architect1 == "Antoni Gaudi"); |
48 Expect.equals(2, A.map1["Tuesday"]); | 50 Expect.equals(2, A.map1["Tuesday"]); |
49 } | 51 } |
50 } | 52 } |
51 | 53 |
52 main() { | 54 main() { |
53 StaticFinalFieldTest.testMain(); | 55 StaticFinalFieldTest.testMain(); |
54 } | 56 } |
OLD | NEW |