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

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

Issue 10735030: dart2dart fix synthesized constructor appearing in unparser. Don't output it. (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/dart_backend/backend.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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 testSimpleObjectInstantiation() { 126 testSimpleObjectInstantiation() {
127 testUnparse('main(){new Object();}'); 127 testUnparse('main(){new Object();}');
128 } 128 }
129 129
130 testSimpleTopLevelClass() { 130 testSimpleTopLevelClass() {
131 final src = 'main(){new A();}class A{A(){}}'; 131 final src = 'main(){new A();}class A{A(){}}';
132 testDart2Dart(src, (String s) => Expect.equals(src, s)); 132 testDart2Dart(src, (String s) => Expect.equals(src, s));
133 } 133 }
134 134
135 testClassWithSynthesizedConstructor() {
136 final src = 'main(){new A();}class A{}';
137 testDart2Dart(src, (String s) => Expect.equals(src, s));
Anton Muhin 2012/07/10 13:27:46 definitely the time to introduce a helper which ch
Roman 2012/07/10 13:47:16 Done. If no continuation is passed to testDart2Dar
138 }
139
140 testClassWithMethod() {
141 final src = 'main(){var a=new A(); a.foo();}class A{void foo(){}}';
142 testDart2Dart(src, (String s) => Expect.equals(src, s));
143 }
144
135 main() { 145 main() {
136 testGenericTypes(); 146 testGenericTypes();
137 testForLoop(); 147 testForLoop();
138 testEmptyList(); 148 testEmptyList();
139 testClosure(); 149 testClosure();
140 testIndexedOperatorDecl(); 150 testIndexedOperatorDecl();
141 testNativeMethods(); 151 testNativeMethods();
142 testPrefixIncrements(); 152 testPrefixIncrements();
143 testConstModifier(); 153 testConstModifier();
144 testSimpleFileUnparse(); 154 testSimpleFileUnparse();
145 testSimpleObjectInstantiation(); 155 testSimpleObjectInstantiation();
146 testSimpleTopLevelClass(); 156 testSimpleTopLevelClass();
157 testClassWithSynthesizedConstructor();
158 testClassWithMethod();
147 testTopLevelField(); 159 testTopLevelField();
148 } 160 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/dart_backend/backend.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698