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

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

Issue 10690110: dart2dart support for instantiatin simple top-level class: (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
Index: tests/compiler/dart2js/unparser_test.dart
diff --git a/tests/compiler/dart2js/unparser_test.dart b/tests/compiler/dart2js/unparser_test.dart
index 523d0c96a7e6ca735a017fc2aa0810eb27b7a720..184b4d448484f31fbd50de93a0ce5dac1c5a71e7 100644
--- a/tests/compiler/dart2js/unparser_test.dart
+++ b/tests/compiler/dart2js/unparser_test.dart
@@ -19,7 +19,7 @@ testUnparseMember(String member) {
final coreLib = @'''
#library('corelib');
-interface Object {}
+class Object {}
interface bool {}
interface num {}
interface int extends num {}
@@ -127,6 +127,11 @@ testSimpleObjectInstantiation() {
testUnparse('main(){new Object();}');
}
+testSimpleTopLevelClass() {
+ final src = 'main(){new A();}class A{A(){}}';
+ testDart2Dart(src, (String s) => Expect.equals(src, s));
+}
+
main() {
testGenericTypes();
testForLoop();
@@ -138,5 +143,6 @@ main() {
testConstModifier();
testSimpleFileUnparse();
testSimpleObjectInstantiation();
+ testSimpleTopLevelClass();
testTopLevelField();
}

Powered by Google App Engine
This is Rietveld 408576698