| OLD | NEW |
| 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 // | |
| 5 // VMOptions= | |
| 6 // VMOptions=--use_internal_hash_map | |
| 7 | 4 |
| 8 // Tests of hash map behavior, with focus in iteration and concurrent | 5 // Tests of hash map behavior, with focus in iteration and concurrent |
| 9 // modification errors. | 6 // modification errors. |
| 10 | 7 |
| 11 library hash_map2_test; | 8 library hash_map2_test; |
| 12 import "package:expect/expect.dart"; | 9 import "package:expect/expect.dart"; |
| 13 import 'dart:collection'; | 10 import 'dart:collection'; |
| 14 | 11 |
| 15 testMap(Map newMap(), Map newMapFrom(Map map)) { | 12 testMap(Map newMap(), Map newMapFrom(Map map)) { |
| 16 Map gen(int from, int to) { | 13 Map gen(int from, int to) { |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 testMap(() => new LinkedHashMap(), (m) => new LinkedHashMap.from(m)); | 281 testMap(() => new LinkedHashMap(), (m) => new LinkedHashMap.from(m)); |
| 285 } | 282 } |
| 286 | 283 |
| 287 | 284 |
| 288 class BadHashCode { | 285 class BadHashCode { |
| 289 static int idCounter = 0; | 286 static int idCounter = 0; |
| 290 final int id; | 287 final int id; |
| 291 BadHashCode() : id = idCounter++; | 288 BadHashCode() : id = idCounter++; |
| 292 int get hashCode => 42; | 289 int get hashCode => 42; |
| 293 } | 290 } |
| OLD | NEW |