OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 part of dart2js.semantics_visitor_test; | 5 part of dart2js.semantics_visitor_test; |
6 | 6 |
7 const Map<String, List<Test>> SEND_TESTS = const { | 7 const Map<String, List<Test>> SEND_TESTS = const { |
8 'Parameters': const [ | 8 'Parameters': const [ |
9 // Parameters | 9 // Parameters |
10 const Test('m(o) => o;', | 10 const Test('m(o) => o;', |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 ''', | 343 ''', |
344 const Visit(VisitKind.VISIT_UNRESOLVED_GET, | 344 const Visit(VisitKind.VISIT_UNRESOLVED_GET, |
345 name: 'o')), | 345 name: 'o')), |
346 const Test.clazz( | 346 const Test.clazz( |
347 ''' | 347 ''' |
348 class C { | 348 class C { |
349 static set o(_) {} | 349 static set o(_) {} |
350 m() => o; | 350 m() => o; |
351 } | 351 } |
352 ''', | 352 ''', |
353 const Visit(VisitKind.VISIT_UNRESOLVED_GET, | 353 const Visit(VisitKind.VISIT_STATIC_SETTER_GET, |
354 name: 'o')), | 354 element: 'setter(C#o)')), |
| 355 |
355 const Test.clazz( | 356 const Test.clazz( |
356 ''' | 357 ''' |
357 class C { | 358 class C { |
358 static set o(_) {} | 359 static set o(_) {} |
359 m() => C.o; | 360 m() => C.o; |
360 } | 361 } |
361 ''', | 362 ''', |
362 const Visit(VisitKind.VISIT_UNRESOLVED_GET, | 363 const Visit(VisitKind.VISIT_UNRESOLVED_GET, |
363 name: 'o')), | 364 name: 'o')), |
364 const Test.prefix( | 365 const Test.prefix( |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 const Visit(VisitKind.VISIT_UNRESOLVED_INVOKE, | 456 const Visit(VisitKind.VISIT_UNRESOLVED_INVOKE, |
456 name: 'o', | 457 name: 'o', |
457 arguments: '(null,42)')), | 458 arguments: '(null,42)')), |
458 const Test.clazz( | 459 const Test.clazz( |
459 ''' | 460 ''' |
460 class C { | 461 class C { |
461 static set o(_) {} | 462 static set o(_) {} |
462 m() { o(null, 42); } | 463 m() { o(null, 42); } |
463 } | 464 } |
464 ''', | 465 ''', |
465 const Visit(VisitKind.VISIT_UNRESOLVED_INVOKE, | 466 const Visit(VisitKind.VISIT_STATIC_SETTER_INVOKE, |
466 name: 'o', | 467 element: 'setter(C#o)', |
467 arguments: '(null,42)')), | 468 arguments: '(null,42)')), |
468 const Test.clazz( | 469 const Test.clazz( |
469 ''' | 470 ''' |
470 class C { | 471 class C { |
471 static set o(_) {} | 472 static set o(_) {} |
472 m() { C.o(null, 42); } | 473 m() { C.o(null, 42); } |
473 } | 474 } |
474 ''', | 475 ''', |
475 const Visit(VisitKind.VISIT_UNRESOLVED_INVOKE, | 476 const Visit(VisitKind.VISIT_UNRESOLVED_INVOKE, |
476 name: 'o', | 477 name: 'o', |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 m() => p.o; | 714 m() => p.o; |
714 ''', | 715 ''', |
715 const Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_GET, | 716 const Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_GET, |
716 element: 'getter(o)')), | 717 element: 'getter(o)')), |
717 // TODO(johnniwinther): Expect [VISIT_TOP_LEVEL_SETTER_GET] instead. | 718 // TODO(johnniwinther): Expect [VISIT_TOP_LEVEL_SETTER_GET] instead. |
718 const Test( | 719 const Test( |
719 ''' | 720 ''' |
720 set o(_) {} | 721 set o(_) {} |
721 m() => o; | 722 m() => o; |
722 ''', | 723 ''', |
723 const Visit(VisitKind.VISIT_UNRESOLVED_GET, | 724 const Visit(VisitKind.VISIT_TOP_LEVEL_SETTER_GET, |
724 name: 'o')), | 725 element: 'setter(o)')), |
725 const Test.prefix( | 726 const Test.prefix( |
726 ''' | 727 ''' |
727 set o(_) {} | 728 set o(_) {} |
728 ''', | 729 ''', |
729 ''' | 730 ''' |
730 m() => p.o; | 731 m() => p.o; |
731 ''', | 732 ''', |
732 const Visit(VisitKind.VISIT_UNRESOLVED_GET, | 733 const Visit(VisitKind.VISIT_UNRESOLVED_GET, |
733 name: 'o')), | 734 name: 'o')), |
734 // TODO(johnniwinther): Expect [VISIT_TOP_LEVEL_GETTER_SET] instead. | 735 // TODO(johnniwinther): Expect [VISIT_TOP_LEVEL_GETTER_SET] instead. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 'm() { p.o(null, 42); }', | 780 'm() { p.o(null, 42); }', |
780 const Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_INVOKE, | 781 const Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_INVOKE, |
781 element: 'getter(o)', | 782 element: 'getter(o)', |
782 arguments: '(null,42)')), | 783 arguments: '(null,42)')), |
783 // TODO(johnniwinther): Expected [VISIT_TOP_LEVEL_SETTER_INVOKE] instead. | 784 // TODO(johnniwinther): Expected [VISIT_TOP_LEVEL_SETTER_INVOKE] instead. |
784 const Test( | 785 const Test( |
785 ''' | 786 ''' |
786 set o(_) {} | 787 set o(_) {} |
787 m() => o(null, 42); | 788 m() => o(null, 42); |
788 ''', | 789 ''', |
789 const Visit(VisitKind.VISIT_UNRESOLVED_INVOKE, | 790 const Visit(VisitKind.VISIT_TOP_LEVEL_SETTER_INVOKE, |
790 name: 'o', | 791 element: 'setter(o)', |
791 arguments: '(null,42)')), | 792 arguments: '(null,42)')), |
792 const Test.prefix( | 793 const Test.prefix( |
793 ''' | 794 ''' |
794 set o(_) {} | 795 set o(_) {} |
795 ''', | 796 ''', |
796 'm() { p.o(null, 42); }', | 797 'm() { p.o(null, 42); }', |
797 const Visit(VisitKind.VISIT_UNRESOLVED_INVOKE, | 798 const Visit(VisitKind.VISIT_UNRESOLVED_INVOKE, |
798 name: 'o', | 799 name: 'o', |
799 arguments: '(null,42)')), | 800 arguments: '(null,42)')), |
800 ], | 801 ], |
(...skipping 2702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3503 ''' | 3504 ''' |
3504 m(a) => a ??= 42; | 3505 m(a) => a ??= 42; |
3505 ''', | 3506 ''', |
3506 const Visit( | 3507 const Visit( |
3507 VisitKind.VISIT_PARAMETER_COMPOUND, | 3508 VisitKind.VISIT_PARAMETER_COMPOUND, |
3508 element: 'parameter(m#a)', | 3509 element: 'parameter(m#a)', |
3509 operator: '??=', | 3510 operator: '??=', |
3510 rhs: '42')), | 3511 rhs: '42')), |
3511 ], | 3512 ], |
3512 }; | 3513 }; |
OLD | NEW |