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

Unified Diff: pkg/analyzer2dart/test/end2end_data.dart

Issue 683803003: Support for loops in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 2 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 | « pkg/analyzer2dart/lib/src/dart_backend.dart ('k') | pkg/analyzer2dart/test/sexpr_data.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer2dart/test/end2end_data.dart
diff --git a/pkg/analyzer2dart/test/end2end_data.dart b/pkg/analyzer2dart/test/end2end_data.dart
index 1f68c2d1c7ebf3732c2ff4f75e6949a168f0a6f6..455f790a75739a1e9993d3e19911b8b3809f2b89 100644
--- a/pkg/analyzer2dart/test/end2end_data.dart
+++ b/pkg/analyzer2dart/test/end2end_data.dart
@@ -514,4 +514,48 @@ main(a) {
}
'''),
]),
+
+ const Group('For loop', const <TestSpec>[
+ const TestSpec('''
+main() {
+ for (;;) {}
+}
+''', '''
+main() {
+ while (true) {}
+}
+'''),
+
+const TestSpec('''
+main() {
+ for (int i = 0; i < 10; i = i + 1) {
+ print(i);
+ }
+}
+''', '''
+main() {
+ var i = 0;
+ while (i < 10) {
+ print(i);
+ ++i;
+ }
+}
+'''),
+
+const TestSpec('''
+main(i) {
+ for (i = 0; i < 10; i = i + 1) {
+ print(i);
+ }
+}
+''', '''
+main(i) {
+ i = 0;
+ while (i < 10) {
+ print(i);
+ ++i;
+ }
+}
+'''),
+ ]),
];
« no previous file with comments | « pkg/analyzer2dart/lib/src/dart_backend.dart ('k') | pkg/analyzer2dart/test/sexpr_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698