| 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>> DECL_TESTS = const { | 7 const Map<String, List<Test>> DECL_TESTS = const { |
| 8 'Function declarations': const [ | 8 'Function declarations': const [ |
| 9 const Test( | 9 const Test( |
| 10 ''' | 10 ''' |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 ]), | 654 ]), |
| 655 const Test.clazz( | 655 const Test.clazz( |
| 656 ''' | 656 ''' |
| 657 class C { | 657 class C { |
| 658 var m, n; | 658 var m, n; |
| 659 } | 659 } |
| 660 ''', | 660 ''', |
| 661 const [ | 661 const [ |
| 662 const Visit(VisitKind.VISIT_INSTANCE_FIELD_DECL, | 662 const Visit(VisitKind.VISIT_INSTANCE_FIELD_DECL, |
| 663 element: 'field(C#m)'), | 663 element: 'field(C#m)'), |
| 664 const Visit(VisitKind.VISIT_INSTANCE_FIELD_DECL, |
| 665 element: 'field(C#n)'), |
| 664 ]), | 666 ]), |
| 665 const Test.clazz( | 667 const Test.clazz( |
| 666 ''' | 668 ''' |
| 667 class C { | 669 class C { |
| 668 var m = 42; | 670 var m = 42; |
| 669 } | 671 } |
| 670 ''', | 672 ''', |
| 671 const [ | 673 const [ |
| 672 const Visit(VisitKind.VISIT_INSTANCE_FIELD_DECL, | 674 const Visit(VisitKind.VISIT_INSTANCE_FIELD_DECL, |
| 673 element: 'field(C#m)', | 675 element: 'field(C#m)', |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 element: 'field(C#m)'), | 782 element: 'field(C#m)'), |
| 781 ]), | 783 ]), |
| 782 const Test.clazz( | 784 const Test.clazz( |
| 783 ''' | 785 ''' |
| 784 class C { | 786 class C { |
| 785 static var m, n; | 787 static var m, n; |
| 786 } | 788 } |
| 787 ''', | 789 ''', |
| 788 const [ | 790 const [ |
| 789 const Visit(VisitKind.VISIT_STATIC_FIELD_DECL, | 791 const Visit(VisitKind.VISIT_STATIC_FIELD_DECL, |
| 790 element: 'field(C#m)'), | 792 element: 'field(C#m)'), |
| 793 const Visit(VisitKind.VISIT_STATIC_FIELD_DECL, |
| 794 element: 'field(C#n)'), |
| 791 ]), | 795 ]), |
| 792 const Test.clazz( | 796 const Test.clazz( |
| 793 ''' | 797 ''' |
| 794 class C { | 798 class C { |
| 795 static var k, l, m, n; | 799 static var k, l, m, n; |
| 796 } | 800 } |
| 797 ''', | 801 ''', |
| 798 const [ | 802 const [ |
| 799 const Visit(VisitKind.VISIT_STATIC_FIELD_DECL, | 803 const Visit(VisitKind.VISIT_STATIC_FIELD_DECL, |
| 800 element: 'field(C#m)'), | 804 element: 'field(C#k)'), |
| 805 const Visit(VisitKind.VISIT_STATIC_FIELD_DECL, |
| 806 element: 'field(C#l)'), |
| 807 const Visit(VisitKind.VISIT_STATIC_FIELD_DECL, |
| 808 element: 'field(C#m)'), |
| 809 const Visit(VisitKind.VISIT_STATIC_FIELD_DECL, |
| 810 element: 'field(C#n)'), |
| 801 ]), | 811 ]), |
| 802 const Test.clazz( | 812 const Test.clazz( |
| 803 ''' | 813 ''' |
| 804 class C { | 814 class C { |
| 805 static var m = 42; | 815 static var m = 42; |
| 806 } | 816 } |
| 807 ''', | 817 ''', |
| 808 const [ | 818 const [ |
| 809 const Visit(VisitKind.VISIT_STATIC_FIELD_DECL, | 819 const Visit(VisitKind.VISIT_STATIC_FIELD_DECL, |
| 810 element: 'field(C#m)', | 820 element: 'field(C#m)', |
| 811 rhs: 42), | 821 rhs: 42), |
| 812 ]), | 822 ]), |
| 813 const Test.clazz( | 823 const Test.clazz( |
| 814 ''' | 824 ''' |
| 815 class C { | 825 class C { |
| 816 static var m = 42, n = true; | 826 static var m = 42, n = true; |
| 817 } | 827 } |
| 818 ''', | 828 ''', |
| 819 const [ | 829 const [ |
| 820 const Visit(VisitKind.VISIT_STATIC_FIELD_DECL, | 830 const Visit(VisitKind.VISIT_STATIC_FIELD_DECL, |
| 821 element: 'field(C#m)', | 831 element: 'field(C#m)', |
| 822 rhs: 42), | 832 rhs: 42), |
| 833 const Visit(VisitKind.VISIT_STATIC_FIELD_DECL, |
| 834 element: 'field(C#n)', |
| 835 rhs: true), |
| 823 ]), | 836 ]), |
| 824 const Test.clazz( | 837 const Test.clazz( |
| 825 ''' | 838 ''' |
| 826 class C { | 839 class C { |
| 827 static const m = 42; | 840 static const m = 42; |
| 828 } | 841 } |
| 829 ''', | 842 ''', |
| 830 const [ | 843 const [ |
| 831 const Visit(VisitKind.VISIT_STATIC_CONSTANT_DECL, | 844 const Visit(VisitKind.VISIT_STATIC_CONSTANT_DECL, |
| 832 element: 'field(C#m)', | 845 element: 'field(C#m)', |
| 833 constant: 42), | 846 constant: 42), |
| 834 ]), | 847 ]), |
| 835 const Test( | 848 const Test( |
| 836 ''' | 849 ''' |
| 837 var m; | 850 var m; |
| 838 ''', | 851 ''', |
| 839 const [ | 852 const [ |
| 840 const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_DECL, | 853 const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_DECL, |
| 841 element: 'field(m)'), | 854 element: 'field(m)'), |
| 842 ]), | 855 ]), |
| 843 const Test( | 856 const Test( |
| 844 ''' | 857 ''' |
| 845 var m, n; | 858 var m, n; |
| 846 ''', | 859 ''', |
| 847 const [ | 860 const [ |
| 848 const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_DECL, | 861 const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_DECL, |
| 849 element: 'field(m)'), | 862 element: 'field(m)'), |
| 863 const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_DECL, |
| 864 element: 'field(n)'), |
| 850 ]), | 865 ]), |
| 851 const Test( | 866 const Test( |
| 852 ''' | 867 ''' |
| 853 var m = 42; | 868 var m = 42; |
| 854 ''', | 869 ''', |
| 855 const [ | 870 const [ |
| 856 const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_DECL, | 871 const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_DECL, |
| 857 element: 'field(m)', | 872 element: 'field(m)', |
| 858 rhs: 42), | 873 rhs: 42), |
| 859 ]), | 874 ]), |
| 860 const Test( | 875 const Test( |
| 861 ''' | 876 ''' |
| 862 const m = 42; | 877 const m = 42; |
| 863 ''', | 878 ''', |
| 864 const [ | 879 const [ |
| 865 const Visit(VisitKind.VISIT_TOP_LEVEL_CONSTANT_DECL, | 880 const Visit(VisitKind.VISIT_TOP_LEVEL_CONSTANT_DECL, |
| 866 element: 'field(m)', | 881 element: 'field(m)', |
| 867 constant: 42), | 882 constant: 42), |
| 868 ]), | 883 ]), |
| 869 ], | 884 ], |
| 870 }; | 885 }; |
| OLD | NEW |