| 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 import '../../../lib/compiler/implementation/util/util.dart'; | 5 import '../../../sdk/lib/_internal/compiler/implementation/util/util.dart'; |
| 6 import '../../../lib/compiler/implementation/util/util_implementation.dart'; | 6 import '../../../sdk/lib/_internal/compiler/implementation/util/util_implementat
ion.dart'; |
| 7 | 7 |
| 8 main() { | 8 main() { |
| 9 test(const Link<Comparable>().prepend('three').prepend(2).prepend('one'), | 9 test(const Link<Comparable>().prepend('three').prepend(2).prepend('one'), |
| 10 ['one', 2, 'three']); | 10 ['one', 2, 'three']); |
| 11 test(const Link<Comparable>().prepend(3).prepend('two').prepend(1), | 11 test(const Link<Comparable>().prepend(3).prepend('two').prepend(1), |
| 12 [1, 'two', 3]); | 12 [1, 'two', 3]); |
| 13 test(const Link<String>().prepend('single'), ['single']); | 13 test(const Link<String>().prepend('single'), ['single']); |
| 14 test(const Link(), []); | 14 test(const Link(), []); |
| 15 testFromList([]); | 15 testFromList([]); |
| 16 testFromList([0]); | 16 testFromList([0]); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 37 Expect.equals(list[i++], element); | 37 Expect.equals(list[i++], element); |
| 38 } | 38 } |
| 39 Expect.equals(list.length, i); | 39 Expect.equals(list.length, i); |
| 40 i = 0; | 40 i = 0; |
| 41 for (; !link.isEmpty; link = link.tail) { | 41 for (; !link.isEmpty; link = link.tail) { |
| 42 Expect.equals(list[i++], link.head); | 42 Expect.equals(list[i++], link.head); |
| 43 } | 43 } |
| 44 Expect.equals(list.length, i); | 44 Expect.equals(list.length, i); |
| 45 Expect.isTrue(link.isEmpty); | 45 Expect.isTrue(link.isEmpty); |
| 46 } | 46 } |
| OLD | NEW |