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

Side by Side Diff: tests/language/minify_closure_variable_collision_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Regression test for dart2js, that used to minify a captured 5 // Regression test for dart2js, that used to minify a captured
6 // variable's name to the same name as inherited Object methods. 6 // variable's name to the same name as inherited Object methods.
7 7
8 var array = [new A()]; 8 var array = [new A()];
9 9
10 class A { 10 class A {
11 operator==(other) { 11 operator ==(other) {
12 return true; 12 return true;
13 } 13 }
14 } 14 }
15 15
16 foo() { 16 foo() {
17 // Use lots of variables, to maximize the chance of collisions. 17 // Use lots of variables, to maximize the chance of collisions.
18 var a = 42; 18 var a = 42;
19 var b = 42; 19 var b = 42;
20 var c = 42; 20 var c = 42;
21 var d = 42; 21 var d = 42;
(...skipping 14 matching lines...) Expand all
36 36
37 main() { 37 main() {
38 foo(); 38 foo();
39 if (array[0] == new A()) { 39 if (array[0] == new A()) {
40 throw 'Test failed'; 40 throw 'Test failed';
41 } 41 }
42 if (array[0]() != 42 * 14) { 42 if (array[0]() != 42 * 14) {
43 throw 'Test failed'; 43 throw 'Test failed';
44 } 44 }
45 } 45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698