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

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

Issue 113883002: Create associated packages for the dart:collection and dart:async libs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update SDK dependency to 1.0.0 Created 7 years 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/collection/test/equality_test.dart » ('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 algorithm utilities. 5 /// Tests algorithm utilities.
6 6
7 import "package:collection_helpers/all.dart"; 7 import "package:collection/collection.dart";
8 import "package:unittest/unittest.dart"; 8 import "package:unittest/unittest.dart";
9 import 'dart:math'; 9 import 'dart:math';
10 10
11 void main() { 11 void main() {
12 void testShuffle(List list) { 12 void testShuffle(List list) {
13 List copy = list.toList(); 13 List copy = list.toList();
14 shuffle(list); 14 shuffle(list);
15 expect(new UnorderedIterableEquality().equals(list, copy), isTrue); 15 expect(new UnorderedIterableEquality().equals(list, copy), isTrue);
16 } 16 }
17 17
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 C(this.id); 261 C(this.id);
262 } 262 }
263 int compareC(C one, C other) => one.id - other.id; 263 int compareC(C one, C other) => one.id - other.id;
264 264
265 class OC implements Comparable<OC> { 265 class OC implements Comparable<OC> {
266 final int id; 266 final int id;
267 final int order; 267 final int order;
268 OC(this.id, this.order); 268 OC(this.id, this.order);
269 int compareTo(OC other) => id - other.id; 269 int compareTo(OC other) => id - other.id;
270 String toString() => "OC[$id,$order]"; 270 String toString() => "OC[$id,$order]";
271 } 271 }
OLDNEW
« no previous file with comments | « pkg/collection/pubspec.yaml ('k') | pkg/collection/test/equality_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698