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

Side by Side Diff: frog/tests/leg_only/src/IfTest.dart

Issue 10250002: test rename overhaul: step 5 - frog and leg tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 int if1() {
6 if (true) {
7 return 499;
8 }
9 return 3;
10 }
11
12 int if2() {
13 if (true) {
14 return 499;
15 }
16 }
17
18 int if3() {
19 if (false) {
20 return 42;
21 } else {
22 if (true) {
23 return 499;
24 }
25 Expect.fail('unreachable');
26 }
27 }
28
29 int if4() {
30 if (true) {
31 return 499;
32 } else {
33 return 42;
34 }
35 }
36
37 int if5() {
38 if (true) {
39 if (false) return 42;
40 } else {
41 }
42 return 499;
43 }
44
45 int if6() {
46 if (true) {
47 if (false) return 42;
48 }
49 return 499;
50 }
51
52 void main() {
53 Expect.equals(499, if1());
54 Expect.equals(499, if2());
55 Expect.equals(499, if3());
56 Expect.equals(499, if4());
57 Expect.equals(499, if5());
58 Expect.equals(499, if6());
59 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698