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

Side by Side Diff: test/kernel/regression/issue_000004.dart.txt

Issue 2420053003: Update kernel module. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « test/kernel/regression/for_loop.dart.txt ('k') | test/kernel/regression/super.dart.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library; 1 library;
2 import self as self; 2 import self as self;
3 import "package:expect/expect.dart" as exp; 3 import "package:expect/expect.dart" as exp;
4 4
5 static field dynamic global; 5 static field dynamic global;
6 static method fact4() → dynamic { 6 static method fact4() → dynamic {
7 dynamic f = 1; 7 dynamic f = 1;
8 for(dynamic n in <dynamic>[1, 2, 3, 4]) { 8 for (dynamic n in <dynamic>[1, 2, 3, 4]) {
9 f = f.*(n); 9 f = f.*(n);
10 } 10 }
11 return f; 11 return f;
12 } 12 }
13 static method fact5() → dynamic { 13 static method fact5() → dynamic {
14 dynamic f = 1; 14 dynamic f = 1;
15 dynamic n; 15 dynamic n;
16 for(final dynamic #t1 in <dynamic>[1, 2, 3, 4, 5]) { 16 for (final dynamic #t1 in <dynamic>[1, 2, 3, 4, 5]) {
17 n = #t1; 17 n = #t1;
18 f = f.*(n); 18 f = f.*(n);
19 } 19 }
20 return f; 20 return f;
21 } 21 }
22 static method fact6() → dynamic { 22 static method fact6() → dynamic {
23 dynamic f = 1; 23 dynamic f = 1;
24 for(final dynamic #t2 in <dynamic>[1, 2, 3, 4, 5, 6]) { 24 for (final dynamic #t2 in <dynamic>[1, 2, 3, 4, 5, 6]) {
25 self::global = #t2; 25 self::global = #t2;
26 f = f.*(self::global); 26 f = f.*(self::global);
27 } 27 }
28 return f; 28 return f;
29 } 29 }
30 static method main() → dynamic { 30 static method main() → dynamic {
31 exp::Expect::isTrue(self::fact4().==(24)); 31 exp::Expect::isTrue(self::fact4().==(24));
32 exp::Expect::isTrue(self::fact5().==(120)); 32 exp::Expect::isTrue(self::fact5().==(120));
33 exp::Expect::isTrue(self::fact6().==(720)); 33 exp::Expect::isTrue(self::fact6().==(720));
34 } 34 }
OLDNEW
« no previous file with comments | « test/kernel/regression/for_loop.dart.txt ('k') | test/kernel/regression/super.dart.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698