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

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

Issue 10878004: Properly rename main methods declared in imported libs. (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/dart_backend/renamer.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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 var expectedResult = 568 var expectedResult =
569 'interface I{}' 569 'interface I{}'
570 'class A<T extends I>{}' 570 'class A<T extends I>{}'
571 'interface p_I{}' 571 'interface p_I{}'
572 'class p_A<p_T extends p_I>{}' 572 'class p_A<p_T extends p_I>{}'
573 'main(){new p_A(); new A();}'; 573 'main(){new p_A(); new A();}';
574 testDart2DartWithLibrary(mainSrc, librarySrc, 574 testDart2DartWithLibrary(mainSrc, librarySrc,
575 (String result) { Expect.equals(expectedResult, result); }); 575 (String result) { Expect.equals(expectedResult, result); });
576 } 576 }
577 577
578 testDoubleMains() {
579 var librarySrc = '''
580 #library('mylib');
581 main() {}
582 ''';
583 var mainSrc = '''
584 #import('mylib.dart', prefix: 'mylib');
585 main() {
586 mylib.main();
587 }
588 ''';
589 var expectedResult =
590 'p_main(){}'
591 'main(){p_main();}';
592 testDart2DartWithLibrary(mainSrc, librarySrc,
593 (String result) { Expect.equals(expectedResult, result); });
594 }
595
578 main() { 596 main() {
579 testSignedConstants(); 597 testSignedConstants();
580 testGenericTypes(); 598 testGenericTypes();
581 testForLoop(); 599 testForLoop();
582 testEmptyList(); 600 testEmptyList();
583 testClosure(); 601 testClosure();
584 testIndexedOperatorDecl(); 602 testIndexedOperatorDecl();
585 testNativeMethods(); 603 testNativeMethods();
586 testPrefixIncrements(); 604 testPrefixIncrements();
587 testConstModifier(); 605 testConstModifier();
(...skipping 13 matching lines...) Expand all
601 testConflictLibraryClassRename(); 619 testConflictLibraryClassRename();
602 testDefaultClassWithArgs(); 620 testDefaultClassWithArgs();
603 testClassExtendsWithArgs(); 621 testClassExtendsWithArgs();
604 testStaticInvocation(); 622 testStaticInvocation();
605 testLibraryGetSet(); 623 testLibraryGetSet();
606 testFieldTypeOutput(); 624 testFieldTypeOutput();
607 testDefaultClassNamePlaceholder(); 625 testDefaultClassNamePlaceholder();
608 testFactoryRename(); 626 testFactoryRename();
609 testTypeVariablesAreRenamed(); 627 testTypeVariablesAreRenamed();
610 testClassTypeArgumentBound(); 628 testClassTypeArgumentBound();
629 testDoubleMains();
611 } 630 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/dart_backend/renamer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698