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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/compiler/implementation/dart_backend/renamer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/unparser_test.dart
diff --git a/tests/compiler/dart2js/unparser_test.dart b/tests/compiler/dart2js/unparser_test.dart
index 984f0b571ec26380cdbebd17e650efdaaa89012c..a2e2f1617cadc44a76cf4332bac56bbb7b9d8d0c 100644
--- a/tests/compiler/dart2js/unparser_test.dart
+++ b/tests/compiler/dart2js/unparser_test.dart
@@ -575,6 +575,24 @@ main() {
(String result) { Expect.equals(expectedResult, result); });
}
+testDoubleMains() {
+ var librarySrc = '''
+#library('mylib');
+main() {}
+''';
+ var mainSrc = '''
+#import('mylib.dart', prefix: 'mylib');
+main() {
+ mylib.main();
+}
+''';
+ var expectedResult =
+ 'p_main(){}'
+ 'main(){p_main();}';
+ testDart2DartWithLibrary(mainSrc, librarySrc,
+ (String result) { Expect.equals(expectedResult, result); });
+}
+
main() {
testSignedConstants();
testGenericTypes();
@@ -608,4 +626,5 @@ main() {
testFactoryRename();
testTypeVariablesAreRenamed();
testClassTypeArgumentBound();
+ testDoubleMains();
}
« 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