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

Side by Side Diff: pkg/analyzer2dart/test/end2end_data.dart

Issue 702453002: Support for-in in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer2dart/lib/src/cps_generator.dart ('k') | pkg/analyzer2dart/test/sexpr_data.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Test data for the end2end test. 5 /// Test data for the end2end test.
6 library test.end2end.data; 6 library test.end2end.data;
7 7
8 import 'test_helper.dart' show Group; 8 import 'test_helper.dart' show Group;
9 import 'test_helper.dart' as base show TestSpec; 9 import 'test_helper.dart' as base show TestSpec;
10 10
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 } 638 }
639 }''', ''' 639 }''', '''
640 main() { 640 main() {
641 var i = 0; 641 var i = 0;
642 while (i < 10) { 642 while (i < 10) {
643 print(i); 643 print(i);
644 ++i; 644 ++i;
645 } 645 }
646 }'''), 646 }'''),
647 ]), 647 ]),
648
649 const Group('For in loop', const <TestSpec>[
650 // TODO(johnniwinther): Add tests for `i` as top-level, static and instance
651 // fields.
652 const TestSpec('''
653 main(a) {
654 for (var i in a) {
655 print(i);
656 }
657 }
658 ''', '''
659 main(a) {
660 var v0 = a.iterator;
661 while (v0.moveNext()) {
662 print(v0.current);
663 }
664 }'''),
665
666 const TestSpec('''
667 main(a) {
668 for (var i in a) {
669 print(i);
670 i = 0;
671 print(i);
672 }
673 }
674 ''', '''
675 main(a) {
676 var v0 = a.iterator, i;
677 while (v0.moveNext()) {
678 i = v0.current;
679 print(i);
680 i = 0;
681 print(i);
682 }
683 }
684 '''),
685
686 const TestSpec('''
687 main(a) {
688 var i;
689 for (i in a) {
690 print(i);
691 }
692 }
693 ''', '''
694 main(a) {
695 var i, v0 = a.iterator;
696 while (v0.moveNext()) {
697 i = v0.current;
698 print(i);
699 }
700 }
701 '''),
702 ]),
648 ]; 703 ];
OLDNEW
« no previous file with comments | « pkg/analyzer2dart/lib/src/cps_generator.dart ('k') | pkg/analyzer2dart/test/sexpr_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698