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

Side by Side Diff: LayoutTests/dart/fib.dart

Issue 1532413002: Added Dartium changes onto 45.0.2454.104 (Closed) Base URL: http://src.chromium.org/blink/branches/chromium/2454
Patch Set: Created 5 years 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 | « LayoutTests/dart/exception-expected.txt ('k') | LayoutTests/dart/fib.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 part of fib.app;
2
3 class Main {
4 static int fib(int n) {
5 if (n < 2)
6 return n;
7 else
8 return fib(n - 1) + fib(n - 2);
9 }
10
11 // FIXME: Make this a unit test.
12 static BodyElement get body => document.body;
13
14 static void main() {
15 log("fib(10) = ${fib(10)}");
16 if (fib(10) != 55) {
17 log("FAIL");
18 return;
19 }
20 log("PASS");
21 }
22
23 static void log(String msg) {
24 Element element = new Element.tag('div');
25 element.innerHtml = msg;
26 body.nodes.add(element);
27 }
28 }
OLDNEW
« no previous file with comments | « LayoutTests/dart/exception-expected.txt ('k') | LayoutTests/dart/fib.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698