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

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

Issue 10735030: dart2dart fix synthesized constructor appearing in unparser. Don't output it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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/backend.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 184b4d448484f31fbd50de93a0ce5dac1c5a71e7..a759a0a34535887017c86850bb713f737eef3313 100644
--- a/tests/compiler/dart2js/unparser_test.dart
+++ b/tests/compiler/dart2js/unparser_test.dart
@@ -132,6 +132,16 @@ testSimpleTopLevelClass() {
testDart2Dart(src, (String s) => Expect.equals(src, s));
}
+testClassWithSynthesizedConstructor() {
+ final src = 'main(){new A();}class A{}';
+ testDart2Dart(src, (String s) => Expect.equals(src, s));
Anton Muhin 2012/07/10 13:27:46 definitely the time to introduce a helper which ch
Roman 2012/07/10 13:47:16 Done. If no continuation is passed to testDart2Dar
+}
+
+testClassWithMethod() {
+ final src = 'main(){var a=new A(); a.foo();}class A{void foo(){}}';
+ testDart2Dart(src, (String s) => Expect.equals(src, s));
+}
+
main() {
testGenericTypes();
testForLoop();
@@ -144,5 +154,7 @@ main() {
testSimpleFileUnparse();
testSimpleObjectInstantiation();
testSimpleTopLevelClass();
+ testClassWithSynthesizedConstructor();
+ testClassWithMethod();
testTopLevelField();
}
« no previous file with comments | « lib/compiler/implementation/dart_backend/backend.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698