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

Side by Side Diff: tests/compiler/dart2js/pretty_parameter_test.dart

Issue 1322973007: Use memory compiler in compiler_helper.dart. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Update cf. comments. Created 5 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 // Test that parameters keep their names in the output. 4 // Test that parameters keep their names in the output.
5 5
6 import 'dart:async'; 6 import 'dart:async';
7 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 import 'package:async_helper/async_helper.dart'; 8 import 'package:async_helper/async_helper.dart';
9 import 'compiler_helper.dart'; 9 import 'compiler_helper.dart';
10 10
(...skipping 17 matching lines...) Expand all
28 } else { 28 } else {
29 t0 = 3; 29 t0 = 3;
30 } 30 }
31 print(t0); 31 print(t0);
32 } 32 }
33 print(t0); 33 print(t0);
34 } 34 }
35 """; 35 """;
36 36
37 const String NO_LOCAL = r""" 37 const String NO_LOCAL = r"""
38 foo(bar, bar) { 38 foo(bar, baz) {
39 if (bar) { 39 if (bar) {
40 baz = 2; 40 baz = 2;
41 } else { 41 } else {
42 baz = 3; 42 baz = 3;
43 } 43 }
44 return baz; 44 return baz;
45 } 45 }
46 """; 46 """;
47 47
48 const String MULTIPLE_PHIS_ONE_LOCAL = r""" 48 const String MULTIPLE_PHIS_ONE_LOCAL = r"""
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 compile(NO_LOCAL, entry: 'foo', check: (String generated) { 97 compile(NO_LOCAL, entry: 'foo', check: (String generated) {
98 Expect.isFalse(generated.contains('var')); 98 Expect.isFalse(generated.contains('var'));
99 }), 99 }),
100 100
101 compile(PARAMETER_INIT, entry: 'foo', check: (String generated) { 101 compile(PARAMETER_INIT, entry: 'foo', check: (String generated) {
102 // Check that there is only one var declaration. 102 // Check that there is only one var declaration.
103 checkNumberOfMatches(new RegExp("var").allMatches(generated).iterator, 1); 103 checkNumberOfMatches(new RegExp("var").allMatches(generated).iterator, 1);
104 }), 104 }),
105 ])); 105 ]));
106 } 106 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/message_kind_helper.dart ('k') | tests/compiler/dart2js/semantic_visitor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698