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

Side by Side Diff: frog/tests/leg_only/do_test.dart

Issue 10536169: Move frog/tests/{leg,leg_only,frog_native} to tests/compiler/. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 void do1() {
6 bool cond = true;
7 var result = 0;
8 var x = 0;
9 do {
10 if (x == 10) cond = false;
11 result += x;
12 x = x + 1;
13 } while(cond);
14 Expect.equals(55, result);
15 }
16
17 void do2() {
18 var t = 0;
19 var i = 0;
20 do {
21 t = t + 10;
22 i++;
23 } while (i == 0);
24 Expect.equals(10, t);
25 }
26
27 void do3() {
28 var i = 0;
29 do {
30 i++;
31 } while (false);
32 Expect.equals(1, i);
33 }
34
35 void do4() {
36 var cond1 = true;
37 var result = 0;
38 var i = 0;
39 do {
40 if (i == 9) cond1 = false;
41 var cond2 = true;
42 var j = 0;
43 do {
44 if (j == 9) cond2 = false;
45 result = result + 1;
46 j = j + 1;
47 } while(cond2);
48 i = i + 1;
49 } while(cond1);
50 Expect.equals(100, result);
51 }
52
53 void main() {
54 do1();
55 do2();
56 do3();
57 do4();
58 }
OLDNEW
« no previous file with comments | « frog/tests/leg_only/constant_fold_number_dart2_j_s_test.dart ('k') | frog/tests/leg_only/empty_method_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698