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

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

Issue 10831406: Make ClassNode visit type parameters in visitChildren (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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("../../../lib/compiler/compiler.dart"); 8 #import("../../../lib/compiler/compiler.dart");
9 #import("../../../lib/compiler/implementation/dart_backend/dart_backend.dart"); 9 #import("../../../lib/compiler/implementation/dart_backend/dart_backend.dart");
10 #import("../../../lib/compiler/implementation/elements/elements.dart"); 10 #import("../../../lib/compiler/implementation/elements/elements.dart");
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 'class A implements p_I{A(){}}' 506 'class A implements p_I{A(){}}'
507 'class B{factory p_I(){}}' 507 'class B{factory p_I(){}}'
508 'interface I default p_B{I();}' 508 'interface I default p_B{I();}'
509 'class p_A implements I{p_A(){}}' 509 'class p_A implements I{p_A(){}}'
510 'class p_B{factory I(){}}' 510 'class p_B{factory I(){}}'
511 'main(){new I(); new p_A(); new p_I(); new A();}'; 511 'main(){new I(); new p_A(); new p_I(); new A();}';
512 testDart2DartWithLibrary(mainSrc, librarySrc, 512 testDart2DartWithLibrary(mainSrc, librarySrc,
513 (String result) { Expect.equals(expectedResult, result); }); 513 (String result) { Expect.equals(expectedResult, result); });
514 } 514 }
515 515
516 testClassTypeArgumentBound() {
517 var librarySrc = '''
518 #library('mylib');
519
520 interface I {}
521 class A<T extends I> {}
522
523 ''';
524 var mainSrc = '''
525 #import('mylib.dart', prefix: 'mylib');
526
527 interface I {}
528 class A<T extends I> {}
529
530 main() {
531 new A();
532 new mylib.A();
533 }
534 ''';
535 var expectedResult =
536 'interface p_I{}'
537 'class p_A<T extends p_I>{}'
538 'interface I{}'
539 'class A<T extends I>{}'
540 'main(){new A(); new p_A();}';
541 testDart2DartWithLibrary(mainSrc, librarySrc,
542 (String result) { Expect.equals(expectedResult, result); });
543 }
544
516 main() { 545 main() {
517 testSignedConstants(); 546 testSignedConstants();
518 testGenericTypes(); 547 testGenericTypes();
519 testForLoop(); 548 testForLoop();
520 testEmptyList(); 549 testEmptyList();
521 testClosure(); 550 testClosure();
522 testIndexedOperatorDecl(); 551 testIndexedOperatorDecl();
523 testNativeMethods(); 552 testNativeMethods();
524 testPrefixIncrements(); 553 testPrefixIncrements();
525 testConstModifier(); 554 testConstModifier();
(...skipping 11 matching lines...) Expand all
537 //testConflictSendsRename(); 566 //testConflictSendsRename();
538 testNoConflictSendsRename(); 567 testNoConflictSendsRename();
539 testConflictLibraryClassRename(); 568 testConflictLibraryClassRename();
540 testDefaultClassWithArgs(); 569 testDefaultClassWithArgs();
541 testClassExtendsWithArgs(); 570 testClassExtendsWithArgs();
542 testStaticInvocation(); 571 testStaticInvocation();
543 testLibraryGetSet(); 572 testLibraryGetSet();
544 testFieldTypeOutput(); 573 testFieldTypeOutput();
545 testDefaultClassNamePlaceholder(); 574 testDefaultClassNamePlaceholder();
546 testFactoryRename(); 575 testFactoryRename();
576 testClassTypeArgumentBound();
547 } 577 }
OLDNEW
« lib/compiler/implementation/tree/nodes.dart ('K') | « lib/compiler/implementation/tree/nodes.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698