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

Side by Side Diff: tests/compiler/dart2js/forloop_box_test.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
« no previous file with comments | « tests/compiler/dart2js/for_in_test.dart ('k') | tests/compiler/dart2js/frontend_checker.dart » ('j') | 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) 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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import "package:async_helper/async_helper.dart"; 6 import "package:async_helper/async_helper.dart";
7 import 'compiler_helper.dart'; 7 import 'compiler_helper.dart';
8 8
9 String TEST = r''' 9 String TEST = r'''
10 main() { 10 main() {
(...skipping 11 matching lines...) Expand all
22 var a; 22 var a;
23 for (var i=0; i<10; run(() => i++)) { 23 for (var i=0; i<10; run(() => i++)) {
24 a = () => i; 24 a = () => i;
25 } 25 }
26 print(a()); 26 print(a());
27 } 27 }
28 '''; 28 ''';
29 29
30 main() { 30 main() {
31 asyncTest(() => compileAll(TEST).then((generated) { 31 asyncTest(() => compileAll(TEST).then((generated) {
32 Expect.isTrue(generated.contains('main_closure(i)'), 32 Expect.isTrue(generated.contains('main_closure(i)'),
33 'for-loop variable was boxed'); 33 'for-loop variable was boxed');
34 })); 34 }));
35 asyncTest(() => compileAll(NEGATIVE_TEST).then((generated) { 35 asyncTest(() => compileAll(NEGATIVE_TEST).then((generated) {
36 Expect.isFalse(generated.contains('main_closure(i)'), 36 Expect.isFalse(generated.contains('main_closure(i)'),
37 'for-loop variable was not boxed'); 37 'for-loop variable was not boxed');
38 })); 38 }));
39 } 39 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/for_in_test.dart ('k') | tests/compiler/dart2js/frontend_checker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698