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

Side by Side Diff: test/codegen/sunflower/sunflower.dart

Issue 1096353002: Remove workaround (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase test expectations Created 5 years, 8 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/codegen/expect/sunflower/sunflower.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library sunflower; 5 library sunflower;
6 6
7 import 'dart:math'; 7 import 'dart:math';
8 import 'dom.dart'; 8 import 'dom.dart';
9 9
10 const ORANGE = "orange"; 10 const ORANGE = "orange";
11 const SEED_RADIUS = 2; 11 const SEED_RADIUS = 2;
12 const SCALE_FACTOR = 4; 12 const SCALE_FACTOR = 4;
13 const TAU = PI * 2; 13 const TAU = PI * 2;
14 const MAX_D = 300; 14 const MAX_D = 300;
15 // TODO(sigmund): remove `num` here, this is to workaround dartbug.com/22937 15 const centerX = MAX_D / 2;
16 const num centerX = MAX_D / 2; 16 const centerY = centerX;
17 const num centerY = centerX;
18 17
19 Element querySelector(String selector) => document.querySelector(selector); 18 Element querySelector(String selector) => document.querySelector(selector);
20 19
21 final InputElement slider = querySelector("#slider"); 20 final InputElement slider = querySelector("#slider");
22 final notes = querySelector("#notes"); 21 final notes = querySelector("#notes");
23 final PHI = (sqrt(5) + 1) / 2; 22 final PHI = (sqrt(5) + 1) / 2;
24 int seeds = 0; 23 int seeds = 0;
25 final CanvasRenderingContext2D context = 24 final CanvasRenderingContext2D context =
26 (querySelector("#canvas") as CanvasElement).getContext('2d'); 25 (querySelector("#canvas") as CanvasElement).getContext('2d');
27 26
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 ..closePath() 67 ..closePath()
69 ..stroke(); 68 ..stroke();
70 } 69 }
71 } 70 }
72 71
73 class Circle { 72 class Circle {
74 final num x, y, radius; 73 final num x, y, radius;
75 74
76 Circle(this.x, this.y, this.radius); 75 Circle(this.x, this.y, this.radius);
77 } 76 }
OLDNEW
« no previous file with comments | « test/codegen/expect/sunflower/sunflower.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698