| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 "package:collection/wrappers.dart"; | |
| 6 import "package:test/test.dart"; | 5 import "package:test/test.dart"; |
| 7 | 6 |
| 7 import "package:collection/collection.dart"; |
| 8 |
| 8 // Test unmodifiable collection views. | 9 // Test unmodifiable collection views. |
| 9 // The collections should pass through the operations that are allowed, | 10 // The collections should pass through the operations that are allowed, |
| 10 // an throw on the ones that aren't without affecting the original. | 11 // an throw on the ones that aren't without affecting the original. |
| 11 | 12 |
| 12 main() { | 13 main() { |
| 13 List list = []; | 14 List list = []; |
| 14 testUnmodifiableList(list, new UnmodifiableListView(list), "empty"); | 15 testUnmodifiableList(list, new UnmodifiableListView(list), "empty"); |
| 15 list = [42]; | 16 list = [42]; |
| 16 testUnmodifiableList(list, new UnmodifiableListView(list), "single-42"); | 17 testUnmodifiableList(list, new UnmodifiableListView(list), "single-42"); |
| 17 list = [7]; | 18 list = [7]; |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 }); | 600 }); |
| 600 | 601 |
| 601 testThrows("$name remove throws", () { | 602 testThrows("$name remove throws", () { |
| 602 wrapped.remove(0); | 603 wrapped.remove(0); |
| 603 }); | 604 }); |
| 604 | 605 |
| 605 testThrows("$name clear throws", () { | 606 testThrows("$name clear throws", () { |
| 606 wrapped.clear(); | 607 wrapped.clear(); |
| 607 }); | 608 }); |
| 608 } | 609 } |
| OLD | NEW |