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

Side by Side Diff: tests/corelib/hash_set_test.dart

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 years, 9 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 | « tests/corelib/hash_map_test.dart ('k') | tests/corelib/indexed_list_access_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 of hash set behavior, with focus in iteration and concurrent 5 // Tests of hash set behavior, with focus in iteration and concurrent
6 // modification errors. 6 // modification errors.
7 7
8 library hash_map2_test; 8 library hash_map2_test;
9 import "package:expect/expect.dart";
10 import 'dart:collection'; 9 import 'dart:collection';
11 10
12 testSet(Set newSet(), Set newSetFrom(Set from)) { 11 testSet(Set newSet(), Set newSetFrom(Set from)) {
13 Set gen(int from, int to) => 12 Set gen(int from, int to) =>
14 new Set.from(new Iterable.generate(to - from, (n) => n + from)); 13 new Set.from(new Iterable.generate(to - from, (n) => n + from));
15 14
16 bool odd(int n) => (n & 1) == 1; 15 bool odd(int n) => (n & 1) == 1;
17 bool even(int n) => (n & 1) == 0; 16 bool even(int n) => (n & 1) == 0;
18 17
19 { // Test growing to largish capacity. 18 { // Test growing to largish capacity.
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 197
199 class BadHashCode { 198 class BadHashCode {
200 static int idCounter = 0; 199 static int idCounter = 0;
201 final int id; 200 final int id;
202 BadHashCode() : id = idCounter++; 201 BadHashCode() : id = idCounter++;
203 int get hashCode => 42; 202 int get hashCode => 42;
204 // operator == is identity. 203 // operator == is identity.
205 // Can't make a bad compareTo that isn't invalid. 204 // Can't make a bad compareTo that isn't invalid.
206 int compareTo(BadHashCode other) => id - other.id; 205 int compareTo(BadHashCode other) => id - other.id;
207 } 206 }
OLDNEW
« no previous file with comments | « tests/corelib/hash_map_test.dart ('k') | tests/corelib/indexed_list_access_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698