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

Side by Side Diff: tests/compiler/dart2js/redundant_phi_eliminator_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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 'dart:async'; 5 import 'dart:async';
6 import 'package:expect/expect.dart'; 6 import 'package:expect/expect.dart';
7 import 'package:async_helper/async_helper.dart'; 7 import 'package:async_helper/async_helper.dart';
8 import 'compiler_helper.dart'; 8 import 'compiler_helper.dart';
9 9
10 const String TEST_ONE = r""" 10 const String TEST_ONE = r"""
11 void foo(bar) { 11 void foo(bar) {
12 var toBeRemoved = 1; 12 var toBeRemoved = 1;
13 if (bar) { 13 if (bar) {
14 } else { 14 } else {
15 } 15 }
16 print(toBeRemoved); 16 print(toBeRemoved);
17 } 17 }
18 """; 18 """;
19 19
20
21 const String TEST_TWO = r""" 20 const String TEST_TWO = r"""
22 void foo() { 21 void foo() {
23 var temp = 0; 22 var temp = 0;
24 var toBeRemoved = temp; 23 var toBeRemoved = temp;
25 for (var i = 0; i == 0; i = i + 1) { 24 for (var i = 0; i == 0; i = i + 1) {
26 toBeRemoved = temp; 25 toBeRemoved = temp;
27 } 26 }
28 print(toBeRemoved); 27 print(toBeRemoved);
29 } 28 }
30 """; 29 """;
31 30
32 main() { 31 main() {
33 asyncTest(() => Future.wait([ 32 asyncTest(() => Future.wait([
34 compile(TEST_ONE, entry: 'foo', check: (String generated) { 33 compile(TEST_ONE, entry: 'foo', check: (String generated) {
35 RegExp regexp = new RegExp("toBeRemoved"); 34 RegExp regexp = new RegExp("toBeRemoved");
36 Expect.isTrue(!regexp.hasMatch(generated)); 35 Expect.isTrue(!regexp.hasMatch(generated));
37 }), 36 }),
38 37 compile(TEST_TWO, entry: 'foo', check: (String generated) {
39 compile(TEST_TWO, entry: 'foo', check: (String generated) { 38 RegExp regexp = new RegExp("toBeRemoved");
40 RegExp regexp = new RegExp("toBeRemoved"); 39 Expect.isTrue(!regexp.hasMatch(generated));
41 Expect.isTrue(!regexp.hasMatch(generated)); 40 regexp = new RegExp("temp");
42 regexp = new RegExp("temp"); 41 Expect.isTrue(!regexp.hasMatch(generated));
43 Expect.isTrue(!regexp.hasMatch(generated)); 42 }),
44 }), 43 ]));
45 ]));
46 } 44 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/quarantined/http_test.dart ('k') | tests/compiler/dart2js/reexport_handled_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698