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

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

Issue 288103003: Change Set.toSet to always return a set with the same behavior. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Change .clone() to use .toSet(). Update docs. Created 6 years, 7 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
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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 expect.sublist(4, null).equals.sublist(4); 216 expect.sublist(4, null).equals.sublist(4);
217 expect.sublist(4, 5).equals.sublist(4, 5); 217 expect.sublist(4, 5).equals.sublist(4, 5);
218 } 218 }
219 219
220 void testSet(var expect) { 220 void testSet(var expect) {
221 testIterable(expect); 221 testIterable(expect);
222 Set set = new Set(); 222 Set set = new Set();
223 expect.add(val).equals.add(val); 223 expect.add(val).equals.add(val);
224 expect.addAll([val]).equals.addAll([val]); 224 expect.addAll([val]).equals.addAll([val]);
225 expect.clear().equals.clear(); 225 expect.clear().equals.clear();
226 expect.cloneEmpty().equals.cloneEmpty();
226 expect.containsAll([val]).equals.containsAll([val]); 227 expect.containsAll([val]).equals.containsAll([val]);
227 expect.difference(set).equals.difference(set); 228 expect.difference(set).equals.difference(set);
228 expect.intersection(set).equals.intersection(set); 229 expect.intersection(set).equals.intersection(set);
229 expect.remove(val).equals.remove(val); 230 expect.remove(val).equals.remove(val);
230 expect.removeAll([val]).equals.removeAll([val]); 231 expect.removeAll([val]).equals.removeAll([val]);
231 expect.removeWhere(func1).equals.removeWhere(func1); 232 expect.removeWhere(func1).equals.removeWhere(func1);
232 expect.retainAll([val]).equals.retainAll([val]); 233 expect.retainAll([val]).equals.retainAll([val]);
233 expect.retainWhere(func1).equals.retainWhere(func1); 234 expect.retainWhere(func1).equals.retainWhere(func1);
234 expect.union(set).equals.union(set); 235 expect.union(set).equals.union(set);
235 } 236 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 }); 279 });
279 280
280 test("Queue", () { 281 test("Queue", () {
281 testQueue(new QueueExpector()); 282 testQueue(new QueueExpector());
282 }); 283 });
283 284
284 test("Map", () { 285 test("Map", () {
285 testMap(new MapExpector()); 286 testMap(new MapExpector());
286 }); 287 });
287 } 288 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698