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

Side by Side Diff: tests/compiler/dart2js_extra/for_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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 void for1() { 7 void for1() {
8 var cond = true; 8 var cond = true;
9 var result = 0; 9 var result = 0;
10 for (var x = 0; cond; x = x + 1) { 10 for (var x = 0; cond; x = x + 1) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 for (i = 0; i < 5; i++) { 48 for (i = 0; i < 5; i++) {
49 sum += i; 49 sum += i;
50 } 50 }
51 Expect.equals(5, i); 51 Expect.equals(5, i);
52 Expect.equals(10, sum); 52 Expect.equals(10, sum);
53 } 53 }
54 54
55 void for6() { 55 void for6() {
56 var i = 0; 56 var i = 0;
57 var sum = 0; 57 var sum = 0;
58 for(; i < 5; i++) { 58 for (; i < 5; i++) {
59 sum += i; 59 sum += i;
60 } 60 }
61 Expect.equals(5, i); 61 Expect.equals(5, i);
62 Expect.equals(10, sum); 62 Expect.equals(10, sum);
63 63
64 sum = 0; 64 sum = 0;
65 i = 0; 65 i = 0;
66 for(; i < 5;) { 66 for (; i < 5;) {
67 sum += i; 67 sum += i;
68 i++; 68 i++;
69 } 69 }
70 Expect.equals(5, i); 70 Expect.equals(5, i);
71 Expect.equals(10, sum); 71 Expect.equals(10, sum);
72 72
73 sum = 0; 73 sum = 0;
74 for(i = 0; i < 5;) { 74 for (i = 0; i < 5;) {
75 sum += i; 75 sum += i;
76 i++; 76 i++;
77 } 77 }
78 Expect.equals(5, i); 78 Expect.equals(5, i);
79 Expect.equals(10, sum); 79 Expect.equals(10, sum);
80 } 80 }
81 81
82 void main() { 82 void main() {
83 for1(); 83 for1();
84 for2(); 84 for2();
85 for3(); 85 for3();
86 for4(); 86 for4();
87 for5(); 87 for5();
88 for6(); 88 for6();
89 } 89 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js_extra/for_in_test.dart ('k') | tests/compiler/dart2js_extra/getters_setters_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698