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

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

Issue 10735053: Fix unparsing of variable definitions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « lib/compiler/implementation/tree/unparser.dart ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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:uri'); 5 #import('dart:uri');
6 #import('parser_helper.dart'); 6 #import('parser_helper.dart');
7 #import("../../../lib/compiler/compiler.dart"); 7 #import("../../../lib/compiler/compiler.dart");
8 #import("../../../lib/compiler/implementation/tree/tree.dart"); 8 #import("../../../lib/compiler/implementation/tree/tree.dart");
9 9
10 testUnparse(String statement) { 10 testUnparse(String statement) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 135 }
136 136
137 testClassWithSynthesizedConstructor() { 137 testClassWithSynthesizedConstructor() {
138 testDart2Dart('main(){new A();}class A{}'); 138 testDart2Dart('main(){new A();}class A{}');
139 } 139 }
140 140
141 testClassWithMethod() { 141 testClassWithMethod() {
142 testDart2Dart('main(){var a=new A(); a.foo();}class A{void foo(){}}'); 142 testDart2Dart('main(){var a=new A(); a.foo();}class A{void foo(){}}');
143 } 143 }
144 144
145 testVariableDefinitions() {
146 testDart2Dart('main(){final var x, y; final String s;}');
147 testDart2Dart('foo(f, g){}main(){foo(1, 2);}');
148 testDart2Dart('foo(f(arg)){}main(){foo(main);}');
149 }
150
145 main() { 151 main() {
146 testGenericTypes(); 152 testGenericTypes();
147 testForLoop(); 153 testForLoop();
148 testEmptyList(); 154 testEmptyList();
149 testClosure(); 155 testClosure();
150 testIndexedOperatorDecl(); 156 testIndexedOperatorDecl();
151 testNativeMethods(); 157 testNativeMethods();
152 testPrefixIncrements(); 158 testPrefixIncrements();
153 testConstModifier(); 159 testConstModifier();
154 testSimpleFileUnparse(); 160 testSimpleFileUnparse();
155 testSimpleObjectInstantiation(); 161 testSimpleObjectInstantiation();
156 testSimpleTopLevelClass(); 162 testSimpleTopLevelClass();
157 testClassWithSynthesizedConstructor(); 163 testClassWithSynthesizedConstructor();
158 testClassWithMethod(); 164 testClassWithMethod();
165 testVariableDefinitions();
159 testTopLevelField(); 166 testTopLevelField();
160 } 167 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/tree/unparser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698