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