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

Unified Diff: tests/compiler/dart2js_extra/for_in_test.dart

Issue 2345083003: dart2js: run dartfmt on tests (Closed)
Patch Set: revert another multipart test Created 4 years, 3 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
« no previous file with comments | « tests/compiler/dart2js_extra/fields_test.dart ('k') | tests/compiler/dart2js_extra/for_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js_extra/for_in_test.dart
diff --git a/tests/compiler/dart2js_extra/for_in_test.dart b/tests/compiler/dart2js_extra/for_in_test.dart
index eb5de79631add7e594ccd104548ac41f55a4c188..46093d8d423161461397136f736b236f67e31da8 100644
--- a/tests/compiler/dart2js_extra/for_in_test.dart
+++ b/tests/compiler/dart2js_extra/for_in_test.dart
@@ -37,7 +37,9 @@ class MyIterable<T> extends IterableBase<T> {
class MyListIterator<T> implements Iterator<T> {
final List<T> values;
int index;
- MyListIterator(List<T> values) : this.values = values, index = -1;
+ MyListIterator(List<T> values)
+ : this.values = values,
+ index = -1;
bool moveNext() => ++index < values.length;
T get current => (0 <= index && index < values.length) ? values[index] : null;
@@ -48,13 +50,17 @@ void main() {
testIterator([], new MyIterable([]));
testIterator([1], [1]);
testIterator([1], new MyIterable([1]));
- testIterator([1,2,3], [1,2,3]);
- testIterator([1,2,3], new MyIterable([1,2,3]));
- testIterator(["a","b","c"], ["a","b","c"]);
- testIterator(["a","b","c"], new MyIterable(["a","b","c"]));
+ testIterator([1, 2, 3], [1, 2, 3]);
+ testIterator([1, 2, 3], new MyIterable([1, 2, 3]));
+ testIterator(["a", "b", "c"], ["a", "b", "c"]);
+ testIterator(["a", "b", "c"], new MyIterable(["a", "b", "c"]));
// Several nested for-in's.
- for (var x in [[["a"]]]) {
+ for (var x in [
+ [
+ ["a"]
+ ]
+ ]) {
for (var y in x) {
for (var z in y) {
Expect.equals("a", z);
@@ -63,7 +69,10 @@ void main() {
}
// Simultaneous iteration of the same iterable.
- for (var iterable in [[1,2,3], new MyIterable([1,2,3])]) {
+ for (var iterable in [
+ [1, 2, 3],
+ new MyIterable([1, 2, 3])
+ ]) {
int result = 0;
for (var x in iterable) {
for (var y in iterable) {
@@ -76,7 +85,7 @@ void main() {
// Using the same variable (showing that the expression is evaluated
// in the outer scope).
int result = 0;
- var x = [1,2,3];
+ var x = [1, 2, 3];
for (var x in x) {
result += x;
}
« no previous file with comments | « tests/compiler/dart2js_extra/fields_test.dart ('k') | tests/compiler/dart2js_extra/for_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698