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 | 6 // VMOptions=--use_compact_hash=false |
7 | 7 |
8 // Tests of hash set behavior, with focus in iteration and concurrent | 8 // Tests of hash set behavior, with focus in iteration and concurrent |
9 // modification errors. | 9 // modification errors. |
10 | 10 |
11 library hash_map2_test; | 11 library hash_map2_test; |
12 import "package:expect/expect.dart"; | 12 import "package:expect/expect.dart"; |
13 import 'dart:collection'; | 13 import 'dart:collection'; |
14 | 14 |
15 testSet(Set newSet(), Set newSetFrom(Iterable from)) { | 15 testSet(Set newSet(), Set newSetFrom(Iterable from)) { |
16 | 16 |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 // Can't make a bad compareTo that isn't invalid. | 325 // Can't make a bad compareTo that isn't invalid. |
326 int compareTo(BadHashCode other) => id - other.id; | 326 int compareTo(BadHashCode other) => id - other.id; |
327 } | 327 } |
328 | 328 |
329 class Mutable { | 329 class Mutable { |
330 int id; | 330 int id; |
331 Mutable(this.id); | 331 Mutable(this.id); |
332 int get hashCode => id; | 332 int get hashCode => id; |
333 bool operator==(other) => other is Mutable && id == other.id; | 333 bool operator==(other) => other is Mutable && id == other.id; |
334 } | 334 } |
OLD | NEW |