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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated latest tests. 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
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 map behavior, with focus in iteration and concurrent 5 // Tests of hash map 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";
9 import 'dart:collection'; 10 import 'dart:collection';
10 11
11 testMap(Map newMap(), Map newMapFrom(Map map)) { 12 testMap(Map newMap(), Map newMapFrom(Map map)) {
12 Map gen(int from, int to) { 13 Map gen(int from, int to) {
13 Map map = new LinkedHashMap(); 14 Map map = new LinkedHashMap();
14 for (int i = from; i < to; i++) map[i] = i; 15 for (int i = from; i < to; i++) map[i] = i;
15 return map; 16 return map;
16 } 17 }
17 18
18 bool odd(int n) => (n & 1) == 1; 19 bool odd(int n) => (n & 1) == 1;
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 testMap(() => new LinkedHashMap(), (m) => new LinkedHashMap.from(m)); 281 testMap(() => new LinkedHashMap(), (m) => new LinkedHashMap.from(m));
281 } 282 }
282 283
283 284
284 class BadHashCode { 285 class BadHashCode {
285 static int idCounter = 0; 286 static int idCounter = 0;
286 final int id; 287 final int id;
287 BadHashCode() : id = idCounter++; 288 BadHashCode() : id = idCounter++;
288 int get hashCode => 42; 289 int get hashCode => 42;
289 } 290 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698