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

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
« no previous file with comments | « lib/compiler/implementation/tree/nodes.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('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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 } 539 }
540 '''; 540 ''';
541 var expectedResult = 541 var expectedResult =
542 'class T{}class B<T>{}class A<T> extends B<T>{T f;}' 542 'class T{}class B<T>{}class A<T> extends B<T>{T f;}'
543 'class p_T{}class p_B<p_T>{}class p_A<p_T> extends p_B<p_T>{p_T f;}' 543 'class p_T{}class p_B<p_T>{}class p_A<p_T> extends p_B<p_T>{p_T f;}'
544 'main(){new p_A<int>().f; new p_T(); new A<int>().f; new T();}'; 544 'main(){new p_A<int>().f; new p_T(); new A<int>().f; new T();}';
545 testDart2DartWithLibrary(mainSrc, librarySrc, 545 testDart2DartWithLibrary(mainSrc, librarySrc,
546 (String result) { Expect.equals(expectedResult, result); }); 546 (String result) { Expect.equals(expectedResult, result); });
547 } 547 }
548 548
549 testClassTypeArgumentBound() {
550 var librarySrc = '''
551 #library('mylib');
552
553 interface I {}
554 class A<T extends I> {}
555
556 ''';
557 var mainSrc = '''
558 #import('mylib.dart', prefix: 'mylib');
559
560 interface I {}
561 class A<T extends I> {}
562
563 main() {
564 new A();
565 new mylib.A();
566 }
567 ''';
568 var expectedResult =
569 'interface I{}'
570 'class A<T extends I>{}'
571 'interface p_I{}'
572 'class p_A<p_T extends p_I>{}'
573 'main(){new p_A(); new A();}';
574 testDart2DartWithLibrary(mainSrc, librarySrc,
575 (String result) { Expect.equals(expectedResult, result); });
576 }
577
549 main() { 578 main() {
550 testSignedConstants(); 579 testSignedConstants();
551 testGenericTypes(); 580 testGenericTypes();
552 testForLoop(); 581 testForLoop();
553 testEmptyList(); 582 testEmptyList();
554 testClosure(); 583 testClosure();
555 testIndexedOperatorDecl(); 584 testIndexedOperatorDecl();
556 testNativeMethods(); 585 testNativeMethods();
557 testPrefixIncrements(); 586 testPrefixIncrements();
558 testConstModifier(); 587 testConstModifier();
(...skipping 12 matching lines...) Expand all
571 testNoConflictSendsRename(); 600 testNoConflictSendsRename();
572 testConflictLibraryClassRename(); 601 testConflictLibraryClassRename();
573 testDefaultClassWithArgs(); 602 testDefaultClassWithArgs();
574 testClassExtendsWithArgs(); 603 testClassExtendsWithArgs();
575 testStaticInvocation(); 604 testStaticInvocation();
576 testLibraryGetSet(); 605 testLibraryGetSet();
577 testFieldTypeOutput(); 606 testFieldTypeOutput();
578 testDefaultClassNamePlaceholder(); 607 testDefaultClassNamePlaceholder();
579 testFactoryRename(); 608 testFactoryRename();
580 testTypeVariablesAreRenamed(); 609 testTypeVariablesAreRenamed();
610 testClassTypeArgumentBound();
581 } 611 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/tree/nodes.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698