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

Side by Side Diff: tests/compiler/dart2js_extra/do_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 do1() { 7 void do1() {
8 bool cond = true; 8 bool cond = true;
9 var result = 0; 9 var result = 0;
10 var x = 0; 10 var x = 0;
11 do { 11 do {
12 if (x == 10) cond = false; 12 if (x == 10) cond = false;
13 result += x; 13 result += x;
14 x = x + 1; 14 x = x + 1;
15 } while(cond); 15 } while (cond);
16 Expect.equals(55, result); 16 Expect.equals(55, result);
17 } 17 }
18 18
19 void do2() { 19 void do2() {
20 var t = 0; 20 var t = 0;
21 var i = 0; 21 var i = 0;
22 do { 22 do {
23 t = t + 10; 23 t = t + 10;
24 i++; 24 i++;
25 } while (i == 0); 25 } while (i == 0);
(...skipping 13 matching lines...) Expand all
39 var result = 0; 39 var result = 0;
40 var i = 0; 40 var i = 0;
41 do { 41 do {
42 if (i == 9) cond1 = false; 42 if (i == 9) cond1 = false;
43 var cond2 = true; 43 var cond2 = true;
44 var j = 0; 44 var j = 0;
45 do { 45 do {
46 if (j == 9) cond2 = false; 46 if (j == 9) cond2 = false;
47 result = result + 1; 47 result = result + 1;
48 j = j + 1; 48 j = j + 1;
49 } while(cond2); 49 } while (cond2);
50 i = i + 1; 50 i = i + 1;
51 } while(cond1); 51 } while (cond1);
52 Expect.equals(100, result); 52 Expect.equals(100, result);
53 } 53 }
54 54
55 void main() { 55 void main() {
56 do1(); 56 do1();
57 do2(); 57 do2();
58 do3(); 58 do3();
59 do4(); 59 do4();
60 } 60 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js_extra/deferred_inheritance_test.dart ('k') | tests/compiler/dart2js_extra/empty_method_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698