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

Side by Side Diff: tests/corelib/hash_map2_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/has_next_iterator_test.dart ('k') | tests/corelib/hash_map_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 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";
10 import 'dart:collection'; 9 import 'dart:collection';
11 10
12 testMap(Map newMap(), Map newMapFrom(Map map)) { 11 testMap(Map newMap(), Map newMapFrom(Map map)) {
13 Map gen(int from, int to) { 12 Map gen(int from, int to) {
14 Map map = new LinkedHashMap(); 13 Map map = new LinkedHashMap();
15 for (int i = from; i < to; i++) map[i] = i; 14 for (int i = from; i < to; i++) map[i] = i;
16 return map; 15 return map;
17 } 16 }
18 17
19 bool odd(int n) => (n & 1) == 1; 18 bool odd(int n) => (n & 1) == 1;
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 testMap(() => new LinkedHashMap(), (m) => new LinkedHashMap.from(m)); 280 testMap(() => new LinkedHashMap(), (m) => new LinkedHashMap.from(m));
282 } 281 }
283 282
284 283
285 class BadHashCode { 284 class BadHashCode {
286 static int idCounter = 0; 285 static int idCounter = 0;
287 final int id; 286 final int id;
288 BadHashCode() : id = idCounter++; 287 BadHashCode() : id = idCounter++;
289 int get hashCode => 42; 288 int get hashCode => 42;
290 } 289 }
OLDNEW
« no previous file with comments | « tests/corelib/has_next_iterator_test.dart ('k') | tests/corelib/hash_map_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698