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

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

Issue 658103003: Support map and list literals in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use LiteralMapEntry to ensure build order 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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 print(0); 494 print(0);
495 return 0; 495 return 0;
496 } else { 496 } else {
497 print(2); 497 print(2);
498 return 2; 498 return 2;
499 } 499 }
500 } 500 }
501 '''), 501 '''),
502 ]), 502 ]),
503 503
504 const Group('List literal', const <TestSpec>[
505 const TestSpec('''
506 main() {
507 return [];
508 }
509 '''),
510
511 const TestSpec('''
512 main() {
513 return <int>[];
514 }
515 '''),
516
517 const TestSpec('''
518 main() {
519 return <int>[0];
520 }
521 '''),
522
523 const TestSpec('''
524 main(a) {
525 return <int>[0, 1, a];
526 }
527 '''),
528
529 const TestSpec('''
530 main(a) {
531 return [0, [1], [a, <int>[3]]];
532 }
533 '''),
534 ]),
535
504 const Group('Constructor invocation', const <TestSpec>[ 536 const Group('Constructor invocation', const <TestSpec>[
505 const TestSpec(''' 537 const TestSpec('''
506 main(a) { 538 main(a) {
507 new Object(); 539 new Object();
508 } 540 }
509 '''), 541 '''),
510 542
511 const TestSpec(''' 543 const TestSpec('''
512 main(a) { 544 main(a) {
513 new Deprecated(""); 545 new Deprecated("");
514 } 546 }
515 '''), 547 '''),
516 ]), 548 ]),
517 549
550 const Group('Map literal', const <TestSpec>[
551 const TestSpec('''
552 main() {
553 return {};
554 }
555 '''),
556
557 const TestSpec('''
558 main() {
559 return <int, String>{};
560 }
561 '''),
562
563 const TestSpec('''
564 main() {
565 return <String, int>{"a": 0};
566 }
567 '''),
568
569 const TestSpec('''
570 main(a) {
571 return <String, int>{"a": 0, "b": 1, "c": a};
572 }
573 '''),
574
575 const TestSpec('''
576 main(a) {
577 return {0: "a", 1: {2: "b"}, a: {3: "c"}};
578 }
579 '''),
580 ]),
518 const Group('For loop', const <TestSpec>[ 581 const Group('For loop', const <TestSpec>[
519 const TestSpec(''' 582 const TestSpec('''
520 main() { 583 main() {
521 for (;;) {} 584 for (;;) {}
522 } 585 }
523 ''', ''' 586 ''', '''
524 main() { 587 main() {
525 while (true) {} 588 while (true) {}
526 } 589 }
527 '''), 590 '''),
(...skipping 24 matching lines...) Expand all
552 main(i) { 615 main(i) {
553 i = 0; 616 i = 0;
554 while (i < 10) { 617 while (i < 10) {
555 print(i); 618 print(i);
556 ++i; 619 ++i;
557 } 620 }
558 } 621 }
559 '''), 622 '''),
560 ]), 623 ]),
561 ]; 624 ];
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