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

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

Issue 12473003: Remove deprecated StringBuffer.add, addAll and addCharCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 'mock_compiler.dart'; 7 import 'mock_compiler.dart';
8 import '../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart'; 8 import '../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart';
9 9
10 testUnparse(String statement) { 10 testUnparse(String statement) {
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 testUnparseTopLevelWithMetadata('typedef C = S<A,B> with M;'); 299 testUnparseTopLevelWithMetadata('typedef C = S<A,B> with M;');
300 300
301 testUnparseTopLevelWithMetadata('typedef C = S with M<A>;'); 301 testUnparseTopLevelWithMetadata('typedef C = S with M<A>;');
302 testUnparseTopLevelWithMetadata('typedef C = S with M<A,B>;'); 302 testUnparseTopLevelWithMetadata('typedef C = S with M<A,B>;');
303 testUnparseTopLevelWithMetadata('typedef C = S with M1<A>,M2;'); 303 testUnparseTopLevelWithMetadata('typedef C = S with M1<A>,M2;');
304 testUnparseTopLevelWithMetadata('typedef C = S with M1,M2<A,B>;'); 304 testUnparseTopLevelWithMetadata('typedef C = S with M1,M2<A,B>;');
305 } 305 }
306 306
307 testUnparseParameters(List<String> variableDeclarations) { 307 testUnparseParameters(List<String> variableDeclarations) {
308 var sb = new StringBuffer(); 308 var sb = new StringBuffer();
309 sb.add('Constructor('); 309 sb.write('Constructor(');
310 int index = 0; 310 int index = 0;
311 for (String variableDeclaration in variableDeclarations) { 311 for (String variableDeclaration in variableDeclarations) {
312 if (index != 0) { 312 if (index != 0) {
313 sb.add(', '); 313 sb.write(', ');
314 } 314 }
315 sb.add(variableDeclaration); 315 sb.write(variableDeclaration);
316 index++; 316 index++;
317 } 317 }
318 sb.add(');'); 318 sb.write(');');
319 319
320 FunctionExpression node = parseMember(sb.toString()); 320 FunctionExpression node = parseMember(sb.toString());
321 index = 0; 321 index = 0;
322 for (VariableDefinitions parameter in node.parameters.nodes) { 322 for (VariableDefinitions parameter in node.parameters.nodes) {
323 Expect.equals(variableDeclarations[index], unparse(parameter)); 323 Expect.equals(variableDeclarations[index], unparse(parameter));
324 index++; 324 index++;
325 } 325 }
326 326
327 } 327 }
328 328
(...skipping 27 matching lines...) Expand all
356 testImport(); 356 testImport();
357 testExport(); 357 testExport();
358 testPart(); 358 testPart();
359 testPartOf(); 359 testPartOf();
360 testCombinators(); 360 testCombinators();
361 testRedirectingFactoryConstructors(); 361 testRedirectingFactoryConstructors();
362 testClassDeclarations(); 362 testClassDeclarations();
363 testMixinApplications(); 363 testMixinApplications();
364 testParameters(); 364 testParameters();
365 } 365 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698