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

Unified Diff: frog/tests/leg_only/for_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « frog/tests/leg_only/for_in_test.dart ('k') | frog/tests/leg_only/function_parameters_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/tests/leg_only/for_test.dart
===================================================================
--- frog/tests/leg_only/for_test.dart (revision 8644)
+++ frog/tests/leg_only/for_test.dart (working copy)
@@ -1,87 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-void for1() {
- var cond = true;
- var result = 0;
- for (var x = 0; cond; x = x + 1) {
- if (x == 10) cond = false;
- result = result + x;
- }
- Expect.equals(55, result);
-}
-
-void for2() {
- var t = 0;
- for (var i = 0; i == 0; i = i + 1) {
- t = t + 10;
- }
- Expect.equals(10, t);
-}
-
-void for3() {
- for (var i = 0; i == 1; i = i + 1) {
- Expect.fail('unreachable');
- }
-}
-
-void for4() {
- var cond1 = true;
- var result = 0;
- for (var i = 0; cond1; i = i + 1) {
- if (i == 9) cond1 = false;
- var cond2 = true;
- for (var j = 0; cond2; j = j + 1) {
- if (j == 9) cond2 = false;
- result = result + 1;
- }
- }
- Expect.equals(100, result);
-}
-
-void for5() {
- var i;
- var sum = 0;
- for (i = 0; i < 5; i++) {
- sum += i;
- }
- Expect.equals(5, i);
- Expect.equals(10, sum);
-}
-
-void for6() {
- var i = 0;
- var sum = 0;
- for(; i < 5; i++) {
- sum += i;
- }
- Expect.equals(5, i);
- Expect.equals(10, sum);
-
- sum = 0;
- i = 0;
- for(; i < 5;) {
- sum += i;
- i++;
- }
- Expect.equals(5, i);
- Expect.equals(10, sum);
-
- sum = 0;
- for(i = 0; i < 5;) {
- sum += i;
- i++;
- }
- Expect.equals(5, i);
- Expect.equals(10, sum);
-}
-
-void main() {
- for1();
- for2();
- for3();
- for4();
- for5();
- for6();
-}
« no previous file with comments | « frog/tests/leg_only/for_in_test.dart ('k') | frog/tests/leg_only/function_parameters_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698