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

Unified Diff: tests/compiler/dart2js/unparser_test.dart

Issue 10834359: dart2dart Fix setter ref with library prefix. (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/placeholder_collector.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 74b65b8072cc155fe43629fee2a3a8e0b7d95c74..bce8f30219d950912f73d3a80c1dea5452a9f5a9 100644
--- a/tests/compiler/dart2js/unparser_test.dart
+++ b/tests/compiler/dart2js/unparser_test.dart
@@ -396,6 +396,26 @@ testStaticInvocation() {
testDart2Dart('main(){var x=Math.parseDouble("1");}');
}
+testLibraryGetSet() {
+ var librarySrc = '''
+#library('mylib');
+
+get topgetset() => 5;
+set topgetset(arg) {}
+''';
+ var mainSrc = '''
+#import('mylib.dart', prefix: 'mylib');
+
+main() {
+ mylib.topgetset;
+ mylib.topgetset = 5;
+}
+''';
+ var expectedResult = 'set topgetset(arg){}get topgetset()=> 5;main(){topgetset; topgetset=5;}';
+ testDart2DartWithLibrary(mainSrc, librarySrc,
+ (String result) { Expect.equals(expectedResult, result); });
+}
+
main() {
testSignedConstants();
testGenericTypes();
@@ -423,4 +443,5 @@ main() {
testDefaultClassWithArgs();
testClassExtendsWithArgs();
testStaticInvocation();
+ testLibraryGetSet();
}
« no previous file with comments | « lib/compiler/implementation/dart_backend/placeholder_collector.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698