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

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

Issue 10702114: dart2dart: fix top level field declarations. (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 a810b34caa79d267c299f7eb65ded1f4d077f234..bf400f8aaeb5db1f9aa1c94b5407776df243bdb3 100644
--- a/tests/compiler/dart2js/unparser_test.dart
+++ b/tests/compiler/dart2js/unparser_test.dart
@@ -111,6 +111,11 @@ main() {
});
}
+testTopLevelField() {
+ final src = 'final String x="asd";main(){x;}';
+ testDart2Dart(src, (String s) => Expect.equals(src, s));
+}
+
main() {
testGenericTypes();
testForLoop();
@@ -120,4 +125,5 @@ main() {
testNativeMethods();
testPrefixIncrements();
testSimpleFileUnparse();
+ testTopLevelField();
}

Powered by Google App Engine
This is Rietveld 408576698