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

Side by Side Diff: test/algorithms_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 /// Tests algorithm utilities. 5 /// Tests algorithm utilities.
6 6
7 import "package:collection/collection.dart"; 7 import "package:collection/collection.dart";
8 import "package:unittest/unittest.dart"; 8 import "package:test/test.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
18 test("Shuffle 0", () { 18 test("Shuffle 0", () {
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 | « pubspec.yaml ('k') | test/canonicalized_map_test.dart » ('j') | test/equality_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698