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

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

Issue 10692073: Start emitting top-level functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 21da79b99d316731910ea721fde3a62edfb4e732..a16d892b3ff73b36a17026e9d167083757a51d04 100644
--- a/tests/compiler/dart2js/unparser_test.dart
+++ b/tests/compiler/dart2js/unparser_test.dart
@@ -89,12 +89,19 @@ testNativeMethods() {
}
testSimpleFileUnparse() {
- testDart2Dart('main() {}', (String s) {
- Expect.equals(
-'''main() {
- final bailout_reason = "I can do nothing right now.";
+ final src = '''
+should_be_dropped() {
}
-''', s);
+
+should_be_kept() {
+}
+
+main() {
+ should_be_kept();
+}
+''';
+ testDart2Dart(src, (String s) {
+ Expect.equals('should_be_kept(){}main(){should_be_kept();}', s);
});
}
« 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