| 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 class ConstListTest { | 5 class ConstListTest { |
| 6 | 6 |
| 7 static testMain() { | 7 static testMain() { |
| 8 List fixedList = new List(4); | 8 List fixedList = new List.fixedLength(4); |
| 9 List fixedList2 = new List(4); | 9 List fixedList2 = new List.fixedLength(4); |
| 10 List growableList = new List(); | 10 List growableList = new List(); |
| 11 List growableList2 = new List(); | 11 List growableList2 = new List(); |
| 12 for (int i = 0; i < 4; i++) { | 12 for (int i = 0; i < 4; i++) { |
| 13 fixedList[i] = i; | 13 fixedList[i] = i; |
| 14 fixedList2[i] = i; | 14 fixedList2[i] = i; |
| 15 growableList.add(i); | 15 growableList.add(i); |
| 16 growableList2.add(i); | 16 growableList2.add(i); |
| 17 } | 17 } |
| 18 Expect.equals(true, growableList == growableList); | 18 Expect.equals(true, growableList == growableList); |
| 19 Expect.equals(false, growableList == growableList2); | 19 Expect.equals(false, growableList == growableList2); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 31 Expect.equals(false, a == b); | 31 Expect.equals(false, a == b); |
| 32 a = const [1, 2, 3.1]; | 32 a = const [1, 2, 3.1]; |
| 33 b = const [1, 2, 3.1]; | 33 b = const [1, 2, 3.1]; |
| 34 Expect.equals(true, a == b); | 34 Expect.equals(true, a == b); |
| 35 } | 35 } |
| 36 } | 36 } |
| 37 | 37 |
| 38 main() { | 38 main() { |
| 39 ConstListTest.testMain(); | 39 ConstListTest.testMain(); |
| 40 } | 40 } |
| OLD | NEW |