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

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

Issue 10752002: support unparsing of "new Object()": (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
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 testDart2Dart(src, (String s) { 116 testDart2Dart(src, (String s) {
117 Expect.equals('should_be_kept(){}main(){should_be_kept();}', s); 117 Expect.equals('should_be_kept(){}main(){should_be_kept();}', s);
118 }); 118 });
119 } 119 }
120 120
121 testTopLevelField() { 121 testTopLevelField() {
122 final src = 'final String x="asd";main(){x;}'; 122 final src = 'final String x="asd";main(){x;}';
123 testDart2Dart(src, (String s) => Expect.equals(src, s)); 123 testDart2Dart(src, (String s) => Expect.equals(src, s));
124 } 124 }
125 125
126 testSimpleObjectInstantiation() {
127 testUnparse('main(){new Object();}');
Anton Muhin 2012/07/09 18:31:26 sorry, what you stopped to output now, element for
Roman 2012/07/10 03:20:29 I don't think I understand the question.
Anton Muhin 2012/07/10 06:56:30 Sorry, let me rephrase it. In the description of
128 }
129
126 main() { 130 main() {
127 testGenericTypes(); 131 testGenericTypes();
128 testForLoop(); 132 testForLoop();
129 testEmptyList(); 133 testEmptyList();
130 testClosure(); 134 testClosure();
131 testIndexedOperatorDecl(); 135 testIndexedOperatorDecl();
132 testNativeMethods(); 136 testNativeMethods();
133 testPrefixIncrements(); 137 testPrefixIncrements();
134 testConstModifier(); 138 testConstModifier();
135 testSimpleFileUnparse(); 139 testSimpleFileUnparse();
140 testSimpleObjectInstantiation();
136 testTopLevelField(); 141 testTopLevelField();
137 } 142 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698