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

Unified Diff: test/dart_codegen/expect/_internal/lists.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/_internal/lists.dart
diff --git a/test/dart_codegen/expect/_internal/lists.dart b/test/dart_codegen/expect/_internal/lists.dart
index 0dc8ef761a0d701ecb384d65c9aaaa62a270332a..3203c6d71d76b08b349c346e9ecb48598efc2813 100644
--- a/test/dart_codegen/expect/_internal/lists.dart
+++ b/test/dart_codegen/expect/_internal/lists.dart
@@ -1,69 +1,74 @@
part of dart._internal;
-
-class Lists {
- static void copy(List src, int srcStart, List dst, int dstStart, int count) {
- if (srcStart < dstStart) {
- for (int i = srcStart + count - 1,
- j = dstStart + count - 1;
- i >= srcStart;
- i--,
- j--) {
- dst[j] = src[i];
+ class Lists {static void copy(List src, int srcStart, List dst, int dstStart, int count) {
+ if (srcStart < dstStart) {
+ for (int i = srcStart + count - 1, j = dstStart + count - 1;
+ i >= srcStart;
+ i--, j--) {
+ dst[j] = src[i];
}
- } else {
- for (int i = srcStart, j = dstStart; i < srcStart + count; i++, j++) {
- dst[j] = src[i];
+ }
+ else {
+ for (int i = srcStart, j = dstStart;
+ i < srcStart + count;
+ i++, j++) {
+ dst[j] = src[i];
}
}
}
- static bool areEqual(List a, var b) {
- if (identical(a, b)) return true;
- if (!(b is List)) return false;
- int length = a.length;
- if (length != b.length) return false;
- for (int i = 0; i < length; i++) {
- if (!identical(a[i], b[i])) return false;
+ static bool areEqual(List a, var b) {
+ if (identical(a, b)) return true;
+ if (!(b is List)) return false;
+ int length = a.length;
+ if (length != b.length) return false;
+ for (int i = 0;
+ i < length;
+ i++) {
+ if (!identical(a[i], b[i])) return false;
}
- return true;
+ return true;
}
- static int indexOf(List a, Object element, int startIndex, int endIndex) {
- if (startIndex >= a.length) {
- return -1;
+ static int indexOf(List a, Object element, int startIndex, int endIndex) {
+ if (startIndex >= a.length) {
+ return -1;
}
- if (startIndex < 0) {
- startIndex = 0;
+ if (startIndex < 0) {
+ startIndex = 0;
}
- for (int i = startIndex; i < endIndex; i++) {
- if (a[i] == element) {
- return i;
+ for (int i = startIndex;
+ i < endIndex;
+ i++) {
+ if (a[i] == element) {
+ return i;
}
}
- return -1;
+ return -1;
}
- static int lastIndexOf(List a, Object element, int startIndex) {
- if (startIndex < 0) {
- return -1;
+ static int lastIndexOf(List a, Object element, int startIndex) {
+ if (startIndex < 0) {
+ return -1;
}
- if (startIndex >= a.length) {
- startIndex = a.length - 1;
+ if (startIndex >= a.length) {
+ startIndex = a.length - 1;
}
- for (int i = startIndex; i >= 0; i--) {
- if (a[i] == element) {
- return i;
+ for (int i = startIndex;
+ i >= 0;
+ i--) {
+ if (a[i] == element) {
+ return i;
}
}
- return -1;
+ return -1;
}
- static void indicesCheck(List a, int start, int end) {
- RangeError.checkValidRange(start, end, a.length);
+ static void indicesCheck(List a, int start, int end) {
+ RangeError.checkValidRange(start, end, a.length);
}
- static void rangeCheck(List a, int start, int length) {
- RangeError.checkNotNegative(length);
- RangeError.checkNotNegative(start);
- if (start + length > a.length) {
- String message = "$start + $length must be in the range [0..${a.length}]";
- throw new RangeError.range(
- length, 0, a.length - start, "length", message);
- }
+ static void rangeCheck(List a, int start, int length) {
+ RangeError.checkNotNegative(length);
+ RangeError.checkNotNegative(start);
+ if (start + length > a.length) {
+ String message = "$start + $length must be in the range [0..${a.length}
+ ]";
+ throw new RangeError.range(length, 0, a.length - start, "length", message);
}
}
+}

Powered by Google App Engine
This is Rietveld 408576698