Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: test/unmodifiable_collection_test.dart

Issue 1213723007: Update to test package, make test work on dart2js. (Closed) Base URL: https://github.com/dart-lang/collection.git@master
Patch Set: Also update version. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"; 5 import "package:collection/wrappers.dart";
6 import "package:unittest/unittest.dart"; 6 import "package:test/test.dart";
7 7
8 // Test unmodifiable collection views. 8 // Test unmodifiable collection views.
9 // The collections should pass through the operations that are allowed, 9 // The collections should pass through the operations that are allowed,
10 // an throw on the ones that aren't without affecting the original. 10 // an throw on the ones that aren't without affecting the original.
11 11
12 main() { 12 main() {
13 List list = []; 13 List list = [];
14 testUnmodifiableList(list, new UnmodifiableListView(list), "empty"); 14 testUnmodifiableList(list, new UnmodifiableListView(list), "empty");
15 list = [42]; 15 list = [42];
16 testUnmodifiableList(list, new UnmodifiableListView(list), "single-42"); 16 testUnmodifiableList(list, new UnmodifiableListView(list), "single-42");
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 }); 620 });
621 621
622 testThrows("$name remove throws", () { 622 testThrows("$name remove throws", () {
623 wrapped.remove(0); 623 wrapped.remove(0);
624 }); 624 });
625 625
626 testThrows("$name clear throws", () { 626 testThrows("$name clear throws", () {
627 wrapped.clear(); 627 wrapped.clear();
628 }); 628 });
629 } 629 }
OLDNEW
« test/equality_test.dart ('K') | « test/queue_list_test.dart ('k') | test/wrapper_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698