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

Side by Side Diff: tests/compiler/dart2js/sourcemaps/data/operators_test_file.dart

Issue 2345083003: dart2js: run dartfmt on tests (Closed)
Patch Set: revert another multipart test Created 4 years, 3 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 // Test file for testing source mappings of operations. 5 // Test file for testing source mappings of operations.
6 6
7 var counter = 0; 7 var counter = 0;
8 8
9 void record(result) { 9 void record(result) {
10 counter++; 10 counter++;
11 } 11 }
12 12
13 main(args) { 13 main(args) {
14 counter++; 14 counter++;
15 operations(args.length > 0, 15 operations(args.length > 0, 0, 1.5, args[0], new Complex(0, 1),
16 0, 1.5, args[0], new Complex(0, 1), new Complex(1.5, 2.5)); 16 new Complex(1.5, 2.5));
17 return counter; 17 return counter;
18 } 18 }
19 19
20 void operations(cond, a, b, c, d, e) { 20 void operations(cond, a, b, c, d, e) {
21 if (cond) record(a + a); 21 if (cond) record(a + a);
22 if (cond) record(a + b); 22 if (cond) record(a + b);
23 if (cond) record(a + c); 23 if (cond) record(a + c);
24 if (cond) record(a + d); 24 if (cond) record(a + d);
25 if (cond) record(a + e); 25 if (cond) record(a + e);
26 if (cond) record(b + a); 26 if (cond) record(b + a);
(...skipping 24 matching lines...) Expand all
51 51
52 const Complex(this.re, this.im); 52 const Complex(this.re, this.im);
53 53
54 operator +(Complex other) => new Complex(re + other.re, im + other.im); 54 operator +(Complex other) => new Complex(re + other.re, im + other.im);
55 55
56 // TODO(johnniwinther): Support implicit null check in '=='. 56 // TODO(johnniwinther): Support implicit null check in '=='.
57 //operator ==(Complex other) => re == other.re && im == other.im; 57 //operator ==(Complex other) => re == other.re && im == other.im;
58 58
59 int get hashCode => 13 * re.hashCode + 17 * im.hashCode; 59 int get hashCode => 13 * re.hashCode + 17 * im.hashCode;
60 } 60 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/sourcemaps/data/invokes_test_file.dart ('k') | tests/compiler/dart2js/sourcemaps/diff.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698