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