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

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

Issue 27300003: Change "typedef" to "class" in core library and related tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update some dart2js tests and unparser. Created 7 years, 2 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 "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 "external const factory Foo() = prefix.Bar<List<T>,T>.baz;"); 276 "external const factory Foo() = prefix.Bar<List<T>,T>.baz;");
277 } 277 }
278 278
279 testClassDeclarations() { 279 testClassDeclarations() {
280 testUnparseTopLevelWithMetadata('class Foo{}'); 280 testUnparseTopLevelWithMetadata('class Foo{}');
281 testUnparseTopLevelWithMetadata('abstract class Foo{}'); 281 testUnparseTopLevelWithMetadata('abstract class Foo{}');
282 testUnparseTopLevelWithMetadata('class Fisk{operator-(x){}}'); 282 testUnparseTopLevelWithMetadata('class Fisk{operator-(x){}}');
283 } 283 }
284 284
285 testMixinApplications() { 285 testMixinApplications() {
286 testUnparseTopLevelWithMetadata('typedef C = S with M;'); 286 testUnparseTopLevelWithMetadata('class C = S with M;');
287 testUnparseTopLevelWithMetadata('typedef C = S with M1,M2;'); 287 testUnparseTopLevelWithMetadata('class C = S with M1,M2;');
288 testUnparseTopLevelWithMetadata('typedef C = S with M1,M2,M3;'); 288 testUnparseTopLevelWithMetadata('class C = S with M1,M2,M3;');
289 289
290 testUnparseTopLevelWithMetadata('typedef C<A> = S with M;'); 290 testUnparseTopLevelWithMetadata('class C<A> = S with M;');
291 testUnparseTopLevelWithMetadata('typedef C<A,B> = S with M;'); 291 testUnparseTopLevelWithMetadata('class C<A,B> = S with M;');
292 292
293 testUnparseTopLevelWithMetadata('typedef C = S<A> with M;'); 293 testUnparseTopLevelWithMetadata('class C = S<A> with M;');
294 testUnparseTopLevelWithMetadata('typedef C = S<A,B> with M;'); 294 testUnparseTopLevelWithMetadata('class C = S<A,B> with M;');
295 295
296 testUnparseTopLevelWithMetadata('typedef C = S with M<A>;'); 296 testUnparseTopLevelWithMetadata('class C = S with M<A>;');
297 testUnparseTopLevelWithMetadata('typedef C = S with M<A,B>;'); 297 testUnparseTopLevelWithMetadata('class C = S with M<A,B>;');
298 testUnparseTopLevelWithMetadata('typedef C = S with M1<A>,M2;'); 298 testUnparseTopLevelWithMetadata('class C = S with M1<A>,M2;');
299 testUnparseTopLevelWithMetadata('typedef C = S with M1,M2<A,B>;'); 299 testUnparseTopLevelWithMetadata('class C = S with M1,M2<A,B>;');
300
301 testUnparseTopLevelWithMetadata('abstract class C = S with M;');
302 testUnparseTopLevelWithMetadata('abstract class C<A> = S<A> with M<A>;');
300 } 303 }
301 304
302 testUnparseParameters(List<String> variableDeclarations) { 305 testUnparseParameters(List<String> variableDeclarations) {
303 var sb = new StringBuffer(); 306 var sb = new StringBuffer();
304 sb.write('Constructor('); 307 sb.write('Constructor(');
305 int index = 0; 308 int index = 0;
306 for (String variableDeclaration in variableDeclarations) { 309 for (String variableDeclaration in variableDeclarations) {
307 if (index != 0) { 310 if (index != 0) {
308 sb.write(', '); 311 sb.write(', ');
309 } 312 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 testExport(); 377 testExport();
375 testPart(); 378 testPart();
376 testPartOf(); 379 testPartOf();
377 testCombinators(); 380 testCombinators();
378 testRedirectingFactoryConstructors(); 381 testRedirectingFactoryConstructors();
379 testClassDeclarations(); 382 testClassDeclarations();
380 testMixinApplications(); 383 testMixinApplications();
381 testParameters(); 384 testParameters();
382 testSymbolLiterals(); 385 testSymbolLiterals();
383 } 386 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/analyze_dart2js_test.dart ('k') | tests/language/mixin_illegal_constructor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698