| 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 #library("GrowableObjectArrayTest.dart"); | 5 #library("GrowableObjectArrayTest.dart"); |
| 6 #import("dart:coreimpl"); | 6 #import("dart:coreimpl"); |
| 7 | 7 |
| 8 class GrowableObjectArrayTest { | 8 class GrowableObjectArrayTest { |
| 9 | 9 |
| 10 static void testOutOfBoundForIndexOf() { | 10 static void testOutOfBoundForIndexOf() { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 Expect.equals(7, array[8]); | 74 Expect.equals(7, array[8]); |
| 75 Expect.equals(8, array[9]); | 75 Expect.equals(8, array[9]); |
| 76 array.copyFrom(array, 5, 4, 2); | 76 array.copyFrom(array, 5, 4, 2); |
| 77 Expect.equals(5, array[4]); | 77 Expect.equals(5, array[4]); |
| 78 Expect.equals(6, array[5]); | 78 Expect.equals(6, array[5]); |
| 79 Expect.equals(6, array[6]); | 79 Expect.equals(6, array[6]); |
| 80 | 80 |
| 81 testOutOfBoundForIndexOf(); | 81 testOutOfBoundForIndexOf(); |
| 82 | 82 |
| 83 GrowableObjectArray<int> h = new GrowableObjectArray<int>.withCapacity(10); | 83 GrowableObjectArray<int> h = new GrowableObjectArray<int>.withCapacity(10); |
| 84 Array constArray = const [0, 1, 2, 3, 4]; | 84 List constArray = const [0, 1, 2, 3, 4]; |
| 85 h.addAll(constArray); | 85 h.addAll(constArray); |
| 86 Expect.equals(5, h.length); | 86 Expect.equals(5, h.length); |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 | 89 |
| 90 main() { | 90 main() { |
| 91 GrowableObjectArrayTest.testMain(); | 91 GrowableObjectArrayTest.testMain(); |
| 92 } | 92 } |
| OLD | NEW |