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

Unified 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, 10 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 side-by-side diff with in-line comments
Download patch
Index: test/dart_codegen/expect/collection/hash_set.dart
diff --git a/test/dart_codegen/expect/collection/hash_set.dart b/test/dart_codegen/expect/collection/hash_set.dart
index f9e1e1af5e1407f8f0bd4ab2149dd13b9f89aa0e..67d62307ecfc2a26291e75f04c186cb861268b2d 100644
--- a/test/dart_codegen/expect/collection/hash_set.dart
+++ b/test/dart_codegen/expect/collection/hash_set.dart
@@ -1,62 +1,55 @@
part of dart.collection;
-
-abstract class _HashSetBase<E> extends SetBase<E> {
- Set<E> difference(Set<Object> other) {
- Set<E> result = _newSet();
- for (var element in this) {
- if (!other.contains(element)) result.add(DDC$RT.cast(element, dynamic, E,
- "CastGeneral",
- """line 17, column 48 of dart:collection/hash_set.dart: """,
- element is E, false));
+ abstract class _HashSetBase<E> extends SetBase<E> {Set<E> difference(Set<Object> other) {
+ Set<E> result = _newSet();
+ for (var element in this) {
+ if (!other.contains(element)) result.add(DDC$RT.cast(element, dynamic, E, "CastGeneral", """line 17, column 48 of dart:collection/hash_set.dart: """, element is E, false));
}
- return result;
+ return result;
}
- Set<E> intersection(Set<Object> other) {
- Set<E> result = _newSet();
- for (var element in this) {
- if (other.contains(element)) result.add(DDC$RT.cast(element, dynamic, E,
- "CastGeneral",
- """line 25, column 47 of dart:collection/hash_set.dart: """,
- element is E, false));
+ Set<E> intersection(Set<Object> other) {
+ Set<E> result = _newSet();
+ for (var element in this) {
+ if (other.contains(element)) result.add(DDC$RT.cast(element, dynamic, E, "CastGeneral", """line 25, column 47 of dart:collection/hash_set.dart: """, element is E, false));
}
- return result;
+ return result;
}
- Set<E> _newSet();
- Set<E> toSet() => _newSet()..addAll(this);
+ Set<E> _newSet();
+ Set<E> toSet() => _newSet()..addAll(this);
}
-abstract class HashSet<E> implements Set<E> {
- factory HashSet({bool equals(E e1, E e2), int hashCode(E e),
- bool isValidKey(potentialKey)}) {
- if (isValidKey == null) {
- if (hashCode == null) {
- if (equals == null) {
- return new _HashSet<E>();
- }
- hashCode = _defaultHashCode;
- } else {
- if (identical(identityHashCode, hashCode) &&
- identical(identical, equals)) {
- return new _IdentityHashSet<E>();
- }
- if (equals == null) {
- equals = _defaultEquals;
- }
+ abstract class HashSet<E> implements Set<E> {factory HashSet({
+bool equals(E e1, E e2), int hashCode(E e), bool isValidKey(potentialKey)}
+) {
+if (isValidKey == null) {
+ if (hashCode == null) {
+ if (equals == null) {
+ return new _HashSet<E>();
}
- } else {
- if (hashCode == null) {
- hashCode = _defaultHashCode;
+ hashCode = _defaultHashCode;
+ }
+ else {
+ if (identical(identityHashCode, hashCode) && identical(identical, equals)) {
+ return new _IdentityHashSet<E>();
}
- if (equals == null) {
- equals = _defaultEquals;
+ if (equals == null) {
+ equals = _defaultEquals;
}
}
- return new _CustomHashSet<E>(equals, hashCode, isValidKey);
}
- factory HashSet.identity() = _IdentityHashSet<E>;
- factory HashSet.from(Iterable elements) {
- HashSet<E> result = new HashSet<E>();
- for (E e in elements) result.add(e);
- return result;
+ else {
+ if (hashCode == null) {
+ hashCode = _defaultHashCode;
+ }
+ if (equals == null) {
+ equals = _defaultEquals;
+ }
}
- Iterator<E> get iterator;
+ return new _CustomHashSet<E>(equals, hashCode, isValidKey);
+}
+ factory HashSet.identity() = _IdentityHashSet<E>;
+ factory HashSet.from(Iterable elements) {
+HashSet<E> result = new HashSet<E>();
+ for (E e in elements) result.add(e);
+ return result;
+}
+ Iterator<E> get iterator;
}

Powered by Google App Engine
This is Rietveld 408576698