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

Side by Side Diff: pkg/collection/test/wrapper_test.dart

Issue 331833003: Revert "Add "last" setter to List." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « pkg/collection/pubspec.yaml ('k') | pkg/pkgbuild.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /// Tests wrapper utilities. 5 /// Tests wrapper utilities.
6 6
7 import "dart:collection"; 7 import "dart:collection";
8 import "package:collection/collection.dart"; 8 import "package:collection/collection.dart";
9 import "package:unittest/unittest.dart"; 9 import "package:unittest/unittest.dart";
10 10
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 expect.addAll([val]).equals.addAll([val]); 190 expect.addAll([val]).equals.addAll([val]);
191 expect.asMap().equals.asMap(); 191 expect.asMap().equals.asMap();
192 expect.clear().equals.clear(); 192 expect.clear().equals.clear();
193 expect.fillRange(4, 5, null).equals.fillRange(4, 5); 193 expect.fillRange(4, 5, null).equals.fillRange(4, 5);
194 expect.fillRange(4, 5, val).equals.fillRange(4, 5, val); 194 expect.fillRange(4, 5, val).equals.fillRange(4, 5, val);
195 expect.getRange(4, 5).equals.getRange(4, 5); 195 expect.getRange(4, 5).equals.getRange(4, 5);
196 expect.indexOf(val, 0).equals.indexOf(val); 196 expect.indexOf(val, 0).equals.indexOf(val);
197 expect.indexOf(val, 4).equals.indexOf(val, 4); 197 expect.indexOf(val, 4).equals.indexOf(val, 4);
198 expect.insert(4, val).equals.insert(4, val); 198 expect.insert(4, val).equals.insert(4, val);
199 expect.insertAll(4, [val]).equals.insertAll(4, [val]); 199 expect.insertAll(4, [val]).equals.insertAll(4, [val]);
200 (expect..last = 5).equals.last = 5;
201 expect.lastIndexOf(val, null).equals.lastIndexOf(val); 200 expect.lastIndexOf(val, null).equals.lastIndexOf(val);
202 expect.lastIndexOf(val, 4).equals.lastIndexOf(val, 4); 201 expect.lastIndexOf(val, 4).equals.lastIndexOf(val, 4);
203 (expect..length = 4).equals.length = 4; 202 (expect..length = 4).equals.length = 4;
204 expect.remove(val).equals.remove(val); 203 expect.remove(val).equals.remove(val);
205 expect.removeAt(4).equals.removeAt(4); 204 expect.removeAt(4).equals.removeAt(4);
206 expect.removeLast().equals.removeLast(); 205 expect.removeLast().equals.removeLast();
207 expect.removeRange(4, 5).equals.removeRange(4, 5); 206 expect.removeRange(4, 5).equals.removeRange(4, 5);
208 expect.removeWhere(func1).equals.removeWhere(func1); 207 expect.removeWhere(func1).equals.removeWhere(func1);
209 expect.replaceRange(4, 5, [val]).equals.replaceRange(4, 5, [val]); 208 expect.replaceRange(4, 5, [val]).equals.replaceRange(4, 5, [val]);
210 expect.retainWhere(func1).equals.retainWhere(func1); 209 expect.retainWhere(func1).equals.retainWhere(func1);
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 655
657 test(".retainWhere", () { 656 test(".retainWhere", () {
658 map["f"] = "foo"; 657 map["f"] = "foo";
659 map["b"] = "bar"; 658 map["b"] = "bar";
660 map["q"] = "qoo"; 659 map["q"] = "qoo";
661 set.retainWhere((element) => element.endsWith("o")); 660 set.retainWhere((element) => element.endsWith("o"));
662 expect(map, equals({"f": "foo", "q": "qoo"})); 661 expect(map, equals({"f": "foo", "q": "qoo"}));
663 }); 662 });
664 }); 663 });
665 } 664 }
OLDNEW
« no previous file with comments | « pkg/collection/pubspec.yaml ('k') | pkg/pkgbuild.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698