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

Side by Side Diff: test/dart_codegen/expect/collection/hash_set.dart

Issue 963593002: Disable formatting and add new-lines to make tests faster. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 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
OLDNEW
1 part of dart.collection; 1 part of dart.collection;
2 2 abstract class _HashSetBase<E> extends SetBase<E> {Set<E> difference(Set<Object > other) {
3 abstract class _HashSetBase<E> extends SetBase<E> { 3 Set<E> result = _newSet();
4 Set<E> difference(Set<Object> other) { 4 for (var element in this) {
5 Set<E> result = _newSet(); 5 if (!other.contains(element)) result.add(DDC$RT.cast(element, dynamic, E, "C astGeneral", """line 17, column 48 of dart:collection/hash_set.dart: """, elemen t is E, false));
6 for (var element in this) {
7 if (!other.contains(element)) result.add(DDC$RT.cast(element, dynamic, E,
8 "CastGeneral",
9 """line 17, column 48 of dart:collection/hash_set.dart: """,
10 element is E, false));
11 } 6 }
12 return result; 7 return result;
13 } 8 }
14 Set<E> intersection(Set<Object> other) { 9 Set<E> intersection(Set<Object> other) {
15 Set<E> result = _newSet(); 10 Set<E> result = _newSet();
16 for (var element in this) { 11 for (var element in this) {
17 if (other.contains(element)) result.add(DDC$RT.cast(element, dynamic, E, 12 if (other.contains(element)) result.add(DDC$RT.cast(element, dynamic, E, "Ca stGeneral", """line 25, column 47 of dart:collection/hash_set.dart: """, element is E, false));
18 "CastGeneral",
19 """line 25, column 47 of dart:collection/hash_set.dart: """,
20 element is E, false));
21 } 13 }
22 return result; 14 return result;
23 } 15 }
24 Set<E> _newSet(); 16 Set<E> _newSet();
25 Set<E> toSet() => _newSet()..addAll(this); 17 Set<E> toSet() => _newSet()..addAll(this);
26 } 18 }
27 abstract class HashSet<E> implements Set<E> { 19 abstract class HashSet<E> implements Set<E> {factory HashSet({
28 factory HashSet({bool equals(E e1, E e2), int hashCode(E e), 20 bool equals(E e1, E e2), int hashCode(E e), bool isValidKey(potentialKey)}
29 bool isValidKey(potentialKey)}) { 21 ) {
30 if (isValidKey == null) { 22 if (isValidKey == null) {
31 if (hashCode == null) { 23 if (hashCode == null) {
32 if (equals == null) { 24 if (equals == null) {
33 return new _HashSet<E>(); 25 return new _HashSet<E>();
34 }
35 hashCode = _defaultHashCode;
36 } else {
37 if (identical(identityHashCode, hashCode) &&
38 identical(identical, equals)) {
39 return new _IdentityHashSet<E>();
40 }
41 if (equals == null) {
42 equals = _defaultEquals;
43 }
44 } 26 }
45 } else { 27 hashCode = _defaultHashCode;
46 if (hashCode == null) { 28 }
47 hashCode = _defaultHashCode; 29 else {
30 if (identical(identityHashCode, hashCode) && identical(identical, equals)) {
31 return new _IdentityHashSet<E>();
48 } 32 }
49 if (equals == null) { 33 if (equals == null) {
50 equals = _defaultEquals; 34 equals = _defaultEquals;
51 } 35 }
52 } 36 }
53 return new _CustomHashSet<E>(equals, hashCode, isValidKey);
54 } 37 }
55 factory HashSet.identity() = _IdentityHashSet<E>; 38 else {
56 factory HashSet.from(Iterable elements) { 39 if (hashCode == null) {
57 HashSet<E> result = new HashSet<E>(); 40 hashCode = _defaultHashCode;
58 for (E e in elements) result.add(e); 41 }
59 return result; 42 if (equals == null) {
43 equals = _defaultEquals;
44 }
60 } 45 }
61 Iterator<E> get iterator; 46 return new _CustomHashSet<E>(equals, hashCode, isValidKey);
62 } 47 }
48 factory HashSet.identity() = _IdentityHashSet<E>;
49 factory HashSet.from(Iterable elements) {
50 HashSet<E> result = new HashSet<E>();
51 for (E e in elements) result.add(e);
52 return result;
53 }
54 Iterator<E> get iterator;
55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698