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

Side by Side Diff: tests/kernel/unsorted/for_in_loop_test.dart

Issue 2451893004: Revert "Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork."" (Closed)
Patch Set: Created 4 years, 1 month 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
(Empty)
1 // Copyright (c) 2016, 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 // Tests of for-in loops and list literals.
6
7 import 'expect.dart';
8
9 fact4() {
10 var f = 1;
11 for (var n in [1, 2, 3, 4]) {
12 f *= n;
13 }
14 return f;
15 }
16
17 fact5() {
18 var f = 1, n;
19 for (n in [1, 2, 3, 4, 5]) {
20 f *= n;
21 }
22 return f;
23 }
24
25 var global;
26 fact6() {
27 var f = 1;
28 for (global in [1, 2, 3, 4, 5, 6]) {
29 f *= global;
30 }
31 return f;
32 }
33
34 main() {
35 Expect.isTrue(fact4() == 24);
36 Expect.isTrue(fact5() == 120);
37 Expect.isTrue(fact6() == 720);
38 }
OLDNEW
« no previous file with comments | « tests/kernel/unsorted/finally_contexts_test.dart ('k') | tests/kernel/unsorted/getters_and_setters_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698