| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart'
; | 6 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart'
; |
| 7 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.
dart'; | 7 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.
dart'; |
| 8 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirro
r.dart'; | 8 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirro
r.dart'; |
| 9 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart' | 9 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart' |
| 10 show currentDirectory, nativeToUriPath; | 10 show currentDirectory, nativeToUriPath; |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 Expect.isFalse(method1.isVariable); | 618 Expect.isFalse(method1.isVariable); |
| 619 Expect.isTrue(method1.isMethod); | 619 Expect.isTrue(method1.isMethod); |
| 620 Expect.isFalse(method1.isPrivate); | 620 Expect.isFalse(method1.isPrivate); |
| 621 Expect.isTrue(method1.isStatic); | 621 Expect.isTrue(method1.isStatic); |
| 622 Expect.isTrue(method1 is MethodMirror); | 622 Expect.isTrue(method1 is MethodMirror); |
| 623 Expect.isTrue(method1.isRegularMethod); | 623 Expect.isTrue(method1.isRegularMethod); |
| 624 Expect.isFalse(method1.isConstConstructor); | 624 Expect.isFalse(method1.isConstConstructor); |
| 625 Expect.isFalse(method1.isGenerativeConstructor); | 625 Expect.isFalse(method1.isGenerativeConstructor); |
| 626 Expect.isFalse(method1.isRedirectingConstructor); | 626 Expect.isFalse(method1.isRedirectingConstructor); |
| 627 Expect.isFalse(method1.isFactoryConstructor); | 627 Expect.isFalse(method1.isFactoryConstructor); |
| 628 Expect.isNull(method1.constructorName); | |
| 629 Expect.isFalse(method1.isGetter); | 628 Expect.isFalse(method1.isGetter); |
| 630 Expect.isFalse(method1.isSetter); | 629 Expect.isFalse(method1.isSetter); |
| 631 Expect.isFalse(method1.isOperator); | 630 Expect.isFalse(method1.isOperator); |
| 632 | 631 |
| 633 var dynamicType = method1.returnType; | 632 var dynamicType = method1.returnType; |
| 634 Expect.isNotNull(dynamicType, "Return type was null"); | 633 Expect.isNotNull(dynamicType, "Return type was null"); |
| 635 Expect.isFalse(dynamicType.isObject, "dynamic is Object"); | 634 Expect.isFalse(dynamicType.isObject, "dynamic is Object"); |
| 636 Expect.isTrue(dynamicType.isDynamic, "dynamic is not dynamic"); | 635 Expect.isTrue(dynamicType.isDynamic, "dynamic is not dynamic"); |
| 637 Expect.isFalse(dynamicType.isVoid, "dynamic is void"); | 636 Expect.isFalse(dynamicType.isVoid, "dynamic is void"); |
| 638 Expect.isFalse(dynamicType.isTypeVariable, "dynamic is a type variable"); | 637 Expect.isFalse(dynamicType.isTypeVariable, "dynamic is a type variable"); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 Expect.isFalse(method2.isVariable); | 670 Expect.isFalse(method2.isVariable); |
| 672 Expect.isTrue(method2.isMethod); | 671 Expect.isTrue(method2.isMethod); |
| 673 Expect.isFalse(method2.isPrivate); | 672 Expect.isFalse(method2.isPrivate); |
| 674 Expect.isFalse(method2.isStatic); | 673 Expect.isFalse(method2.isStatic); |
| 675 Expect.isTrue(method2 is MethodMirror); | 674 Expect.isTrue(method2 is MethodMirror); |
| 676 Expect.isTrue(method2.isRegularMethod); | 675 Expect.isTrue(method2.isRegularMethod); |
| 677 Expect.isFalse(method2.isConstConstructor); | 676 Expect.isFalse(method2.isConstConstructor); |
| 678 Expect.isFalse(method2.isGenerativeConstructor); | 677 Expect.isFalse(method2.isGenerativeConstructor); |
| 679 Expect.isFalse(method2.isRedirectingConstructor); | 678 Expect.isFalse(method2.isRedirectingConstructor); |
| 680 Expect.isFalse(method2.isFactoryConstructor); | 679 Expect.isFalse(method2.isFactoryConstructor); |
| 681 Expect.isNull(method2.constructorName); | |
| 682 Expect.isFalse(method2.isGetter); | 680 Expect.isFalse(method2.isGetter); |
| 683 Expect.isFalse(method2.isSetter); | 681 Expect.isFalse(method2.isSetter); |
| 684 Expect.isFalse(method2.isOperator); | 682 Expect.isFalse(method2.isOperator); |
| 685 | 683 |
| 686 var voidType = method2.returnType; | 684 var voidType = method2.returnType; |
| 687 Expect.isNotNull(voidType, "Return type was null"); | 685 Expect.isNotNull(voidType, "Return type was null"); |
| 688 Expect.isFalse(voidType.isObject, "void is Object"); | 686 Expect.isFalse(voidType.isObject, "void is Object"); |
| 689 Expect.isFalse(voidType.isDynamic, "void is dynamic"); | 687 Expect.isFalse(voidType.isDynamic, "void is dynamic"); |
| 690 Expect.isTrue(voidType.isVoid, "void is not void"); | 688 Expect.isTrue(voidType.isVoid, "void is not void"); |
| 691 Expect.isFalse(voidType.isTypeVariable, "void is a type variable"); | 689 Expect.isFalse(voidType.isTypeVariable, "void is a type variable"); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 Expect.isFalse(method3.isVariable); | 735 Expect.isFalse(method3.isVariable); |
| 738 Expect.isTrue(method3.isMethod); | 736 Expect.isTrue(method3.isMethod); |
| 739 Expect.isFalse(method3.isPrivate); | 737 Expect.isFalse(method3.isPrivate); |
| 740 Expect.isFalse(method3.isStatic); | 738 Expect.isFalse(method3.isStatic); |
| 741 Expect.isTrue(method3 is MethodMirror); | 739 Expect.isTrue(method3 is MethodMirror); |
| 742 Expect.isTrue(method3.isRegularMethod); | 740 Expect.isTrue(method3.isRegularMethod); |
| 743 Expect.isFalse(method3.isConstConstructor); | 741 Expect.isFalse(method3.isConstConstructor); |
| 744 Expect.isFalse(method3.isGenerativeConstructor); | 742 Expect.isFalse(method3.isGenerativeConstructor); |
| 745 Expect.isFalse(method3.isRedirectingConstructor); | 743 Expect.isFalse(method3.isRedirectingConstructor); |
| 746 Expect.isFalse(method3.isFactoryConstructor); | 744 Expect.isFalse(method3.isFactoryConstructor); |
| 747 Expect.isNull(method3.constructorName); | |
| 748 Expect.isFalse(method3.isGetter); | 745 Expect.isFalse(method3.isGetter); |
| 749 Expect.isFalse(method3.isSetter); | 746 Expect.isFalse(method3.isSetter); |
| 750 Expect.isFalse(method3.isOperator); | 747 Expect.isFalse(method3.isOperator); |
| 751 | 748 |
| 752 var method3ReturnType = method3.returnType; | 749 var method3ReturnType = method3.returnType; |
| 753 Expect.isNotNull(method3ReturnType, "Return type is null"); | 750 Expect.isNotNull(method3ReturnType, "Return type is null"); |
| 754 Expect.isTrue(method3ReturnType is ClassMirror, | 751 Expect.isTrue(method3ReturnType is ClassMirror, |
| 755 "Return type is not interface"); | 752 "Return type is not interface"); |
| 756 Expect.equals(bazClass, method3ReturnType.originalDeclaration); | 753 Expect.equals(bazClass, method3ReturnType.originalDeclaration); |
| 757 // TODO(johnniwinther): Test type arguments of [method3ReturnType]. | 754 // TODO(johnniwinther): Test type arguments of [method3ReturnType]. |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 860 Expect.isFalse(operator_eq.isVariable); | 857 Expect.isFalse(operator_eq.isVariable); |
| 861 Expect.isTrue(operator_eq.isMethod); | 858 Expect.isTrue(operator_eq.isMethod); |
| 862 Expect.isFalse(operator_eq.isPrivate); | 859 Expect.isFalse(operator_eq.isPrivate); |
| 863 Expect.isFalse(operator_eq.isStatic); | 860 Expect.isFalse(operator_eq.isStatic); |
| 864 Expect.isTrue(operator_eq is MethodMirror); | 861 Expect.isTrue(operator_eq is MethodMirror); |
| 865 Expect.isTrue(operator_eq.isRegularMethod); | 862 Expect.isTrue(operator_eq.isRegularMethod); |
| 866 Expect.isFalse(operator_eq.isConstConstructor); | 863 Expect.isFalse(operator_eq.isConstConstructor); |
| 867 Expect.isFalse(operator_eq.isGenerativeConstructor); | 864 Expect.isFalse(operator_eq.isGenerativeConstructor); |
| 868 Expect.isFalse(operator_eq.isRedirectingConstructor); | 865 Expect.isFalse(operator_eq.isRedirectingConstructor); |
| 869 Expect.isFalse(operator_eq.isFactoryConstructor); | 866 Expect.isFalse(operator_eq.isFactoryConstructor); |
| 870 Expect.isNull(operator_eq.constructorName); | |
| 871 Expect.isFalse(operator_eq.isGetter); | 867 Expect.isFalse(operator_eq.isGetter); |
| 872 Expect.isFalse(operator_eq.isSetter); | 868 Expect.isFalse(operator_eq.isSetter); |
| 873 Expect.isTrue(operator_eq.isOperator); | 869 Expect.isTrue(operator_eq.isOperator); |
| 874 Expect.stringEquals('==', operatorName(operator_eq)); | 870 Expect.stringEquals('==', operatorName(operator_eq)); |
| 875 | 871 |
| 876 //////////////////////////////////////////////////////////////////////////// | 872 //////////////////////////////////////////////////////////////////////////// |
| 877 // int operator -() => 0; | 873 // int operator -() => 0; |
| 878 //////////////////////////////////////////////////////////////////////////// | 874 //////////////////////////////////////////////////////////////////////////// |
| 879 var operator_negate = bazClassMembers[Mirror.UNARY_MINUS]; | 875 var operator_negate = bazClassMembers[Mirror.UNARY_MINUS]; |
| 880 Expect.isNotNull(operator_negate, "operator < not found"); | 876 Expect.isNotNull(operator_negate, "operator < not found"); |
| 881 Expect.stringEquals(Mirror.UNARY_MINUS, operator_negate.simpleName, | 877 Expect.stringEquals(Mirror.UNARY_MINUS, operator_negate.simpleName, |
| 882 "Unexpected method simpleName"); | 878 "Unexpected method simpleName"); |
| 883 Expect.stringEquals('operator -', displayName(operator_negate)); | 879 Expect.stringEquals('operator -', displayName(operator_negate)); |
| 884 Expect.stringEquals('mirrors_helper.Baz.${Mirror.UNARY_MINUS}', | 880 Expect.stringEquals('mirrors_helper.Baz.${Mirror.UNARY_MINUS}', |
| 885 operator_negate.qualifiedName, | 881 operator_negate.qualifiedName, |
| 886 "Unexpected method qualifiedName"); | 882 "Unexpected method qualifiedName"); |
| 887 Expect.equals(operator_negate.owner, bazClass); | 883 Expect.equals(operator_negate.owner, bazClass); |
| 888 Expect.isFalse(operator_negate.isTopLevel); | 884 Expect.isFalse(operator_negate.isTopLevel); |
| 889 Expect.isFalse(operator_negate.isConstructor); | 885 Expect.isFalse(operator_negate.isConstructor); |
| 890 Expect.isFalse(operator_negate.isVariable); | 886 Expect.isFalse(operator_negate.isVariable); |
| 891 Expect.isTrue(operator_negate.isMethod); | 887 Expect.isTrue(operator_negate.isMethod); |
| 892 Expect.isFalse(operator_negate.isPrivate); | 888 Expect.isFalse(operator_negate.isPrivate); |
| 893 Expect.isFalse(operator_negate.isStatic); | 889 Expect.isFalse(operator_negate.isStatic); |
| 894 Expect.isTrue(operator_negate is MethodMirror); | 890 Expect.isTrue(operator_negate is MethodMirror); |
| 895 Expect.isTrue(operator_negate.isRegularMethod); | 891 Expect.isTrue(operator_negate.isRegularMethod); |
| 896 Expect.isFalse(operator_negate.isConstConstructor); | 892 Expect.isFalse(operator_negate.isConstConstructor); |
| 897 Expect.isFalse(operator_negate.isGenerativeConstructor); | 893 Expect.isFalse(operator_negate.isGenerativeConstructor); |
| 898 Expect.isFalse(operator_negate.isRedirectingConstructor); | 894 Expect.isFalse(operator_negate.isRedirectingConstructor); |
| 899 Expect.isFalse(operator_negate.isFactoryConstructor); | 895 Expect.isFalse(operator_negate.isFactoryConstructor); |
| 900 Expect.isNull(operator_negate.constructorName); | |
| 901 Expect.isFalse(operator_negate.isGetter); | 896 Expect.isFalse(operator_negate.isGetter); |
| 902 Expect.isFalse(operator_negate.isSetter); | 897 Expect.isFalse(operator_negate.isSetter); |
| 903 Expect.isTrue(operator_negate.isOperator); | 898 Expect.isTrue(operator_negate.isOperator); |
| 904 Expect.stringEquals('-', operatorName(operator_negate)); | 899 Expect.stringEquals('-', operatorName(operator_negate)); |
| 905 | 900 |
| 906 | 901 |
| 907 var bazClassConstructors = bazClass.constructors; | 902 var bazClassConstructors = bazClass.constructors; |
| 908 Expect.isNotNull(bazClassConstructors, "Constructors map is null"); | 903 Expect.isNotNull(bazClassConstructors, "Constructors map is null"); |
| 909 Expect.equals(3, bazClassConstructors.length, | 904 Expect.equals(3, bazClassConstructors.length, |
| 910 "Unexpected number of constructors"); | 905 "Unexpected number of constructors"); |
| 911 | 906 |
| 912 //////////////////////////////////////////////////////////////////////////// | 907 //////////////////////////////////////////////////////////////////////////// |
| 913 // Baz(); | 908 // Baz(); |
| 914 //////////////////////////////////////////////////////////////////////////// | 909 //////////////////////////////////////////////////////////////////////////// |
| 915 var bazClassNonameConstructor = bazClassConstructors['Baz']; | 910 var bazClassNonameConstructor = bazClassConstructors['']; |
| 916 Expect.isNotNull(bazClassNonameConstructor); | 911 Expect.isNotNull(bazClassNonameConstructor); |
| 917 Expect.isTrue(bazClassNonameConstructor is MethodMirror); | 912 Expect.isTrue(bazClassNonameConstructor is MethodMirror); |
| 918 Expect.isTrue(bazClassNonameConstructor.isConstructor); | 913 Expect.isTrue(bazClassNonameConstructor.isConstructor); |
| 919 Expect.isFalse(bazClassNonameConstructor.isRegularMethod); | 914 Expect.isFalse(bazClassNonameConstructor.isRegularMethod); |
| 920 Expect.isFalse(bazClassNonameConstructor.isConstConstructor); | 915 Expect.isFalse(bazClassNonameConstructor.isConstConstructor); |
| 921 Expect.isTrue(bazClassNonameConstructor.isGenerativeConstructor); | 916 Expect.isTrue(bazClassNonameConstructor.isGenerativeConstructor); |
| 922 Expect.isFalse(bazClassNonameConstructor.isRedirectingConstructor); | 917 Expect.isFalse(bazClassNonameConstructor.isRedirectingConstructor); |
| 923 Expect.isFalse(bazClassNonameConstructor.isFactoryConstructor); | 918 Expect.isFalse(bazClassNonameConstructor.isFactoryConstructor); |
| 924 Expect.stringEquals('Baz', bazClassNonameConstructor.simpleName); | 919 Expect.stringEquals('', bazClassNonameConstructor.simpleName); |
| 925 Expect.stringEquals('Baz', displayName(bazClassNonameConstructor)); | 920 Expect.stringEquals('Baz', displayName(bazClassNonameConstructor)); |
| 926 Expect.stringEquals('mirrors_helper.Baz.Baz', | 921 Expect.stringEquals('mirrors_helper.Baz.', |
| 927 bazClassNonameConstructor.qualifiedName); | 922 bazClassNonameConstructor.qualifiedName); |
| 928 Expect.stringEquals('', bazClassNonameConstructor.constructorName); | |
| 929 | 923 |
| 930 //////////////////////////////////////////////////////////////////////////// | 924 //////////////////////////////////////////////////////////////////////////// |
| 931 // const Baz.named(); | 925 // const Baz.named(); |
| 932 //////////////////////////////////////////////////////////////////////////// | 926 //////////////////////////////////////////////////////////////////////////// |
| 933 var bazClassNamedConstructor = bazClassConstructors['Baz.named']; | 927 var bazClassNamedConstructor = bazClassConstructors['named']; |
| 934 Expect.isNotNull(bazClassNamedConstructor); | 928 Expect.isNotNull(bazClassNamedConstructor); |
| 935 Expect.isTrue(bazClassNamedConstructor is MethodMirror); | 929 Expect.isTrue(bazClassNamedConstructor is MethodMirror); |
| 936 Expect.isTrue(bazClassNamedConstructor.isConstructor); | 930 Expect.isTrue(bazClassNamedConstructor.isConstructor); |
| 937 Expect.isFalse(bazClassNamedConstructor.isRegularMethod); | 931 Expect.isFalse(bazClassNamedConstructor.isRegularMethod); |
| 938 Expect.isTrue(bazClassNamedConstructor.isConstConstructor); | 932 Expect.isTrue(bazClassNamedConstructor.isConstConstructor); |
| 939 Expect.isFalse(bazClassNamedConstructor.isGenerativeConstructor); | 933 Expect.isFalse(bazClassNamedConstructor.isGenerativeConstructor); |
| 940 Expect.isFalse(bazClassNamedConstructor.isRedirectingConstructor); | 934 Expect.isFalse(bazClassNamedConstructor.isRedirectingConstructor); |
| 941 Expect.isFalse(bazClassNamedConstructor.isFactoryConstructor); | 935 Expect.isFalse(bazClassNamedConstructor.isFactoryConstructor); |
| 942 Expect.stringEquals('Baz.named', bazClassNamedConstructor.simpleName); | 936 Expect.stringEquals('named', bazClassNamedConstructor.simpleName); |
| 943 Expect.stringEquals('Baz.named', displayName(bazClassNamedConstructor)); | 937 Expect.stringEquals('Baz.named', displayName(bazClassNamedConstructor)); |
| 944 Expect.stringEquals('mirrors_helper.Baz.Baz.named', | 938 Expect.stringEquals('mirrors_helper.Baz.named', |
| 945 bazClassNamedConstructor.qualifiedName); | 939 bazClassNamedConstructor.qualifiedName); |
| 946 Expect.stringEquals('named', bazClassNamedConstructor.constructorName); | |
| 947 | 940 |
| 948 //////////////////////////////////////////////////////////////////////////// | 941 //////////////////////////////////////////////////////////////////////////// |
| 949 // factory Baz.factory() => new Baz<E,F>(); | 942 // factory Baz.factory() => new Baz<E,F>(); |
| 950 //////////////////////////////////////////////////////////////////////////// | 943 //////////////////////////////////////////////////////////////////////////// |
| 951 var bazClassFactoryConstructor = bazClassConstructors['Baz.factory']; | 944 var bazClassFactoryConstructor = bazClassConstructors['factory']; |
| 952 Expect.isNotNull(bazClassFactoryConstructor); | 945 Expect.isNotNull(bazClassFactoryConstructor); |
| 953 Expect.isTrue(bazClassFactoryConstructor is MethodMirror); | 946 Expect.isTrue(bazClassFactoryConstructor is MethodMirror); |
| 954 Expect.isTrue(bazClassFactoryConstructor.isConstructor); | 947 Expect.isTrue(bazClassFactoryConstructor.isConstructor); |
| 955 Expect.isFalse(bazClassFactoryConstructor.isRegularMethod); | 948 Expect.isFalse(bazClassFactoryConstructor.isRegularMethod); |
| 956 Expect.isFalse(bazClassFactoryConstructor.isConstConstructor); | 949 Expect.isFalse(bazClassFactoryConstructor.isConstConstructor); |
| 957 Expect.isFalse(bazClassFactoryConstructor.isGenerativeConstructor); | 950 Expect.isFalse(bazClassFactoryConstructor.isGenerativeConstructor); |
| 958 Expect.isFalse(bazClassFactoryConstructor.isRedirectingConstructor); | 951 Expect.isFalse(bazClassFactoryConstructor.isRedirectingConstructor); |
| 959 Expect.isTrue(bazClassFactoryConstructor.isFactoryConstructor); | 952 Expect.isTrue(bazClassFactoryConstructor.isFactoryConstructor); |
| 960 Expect.stringEquals('Baz.factory', bazClassFactoryConstructor.simpleName); | 953 Expect.stringEquals('factory', bazClassFactoryConstructor.simpleName); |
| 961 Expect.stringEquals('Baz.factory', displayName(bazClassFactoryConstructor)); | 954 Expect.stringEquals('Baz.factory', displayName(bazClassFactoryConstructor)); |
| 962 Expect.stringEquals('mirrors_helper.Baz.Baz.factory', | 955 Expect.stringEquals('mirrors_helper.Baz.factory', |
| 963 bazClassFactoryConstructor.qualifiedName); | 956 bazClassFactoryConstructor.qualifiedName); |
| 964 Expect.stringEquals('factory', bazClassFactoryConstructor.constructorName); | |
| 965 | 957 |
| 966 // TODO(johnniwinther): Add more tests of constructors. | 958 // TODO(johnniwinther): Add more tests of constructors. |
| 967 // TODO(johnniwinther): Add a test for unnamed factory methods. | 959 // TODO(johnniwinther): Add a test for unnamed factory methods. |
| 968 | 960 |
| 969 var metadata = bazClass.metadata; | 961 var metadata = bazClass.metadata; |
| 970 Expect.isNotNull(metadata); | 962 Expect.isNotNull(metadata); |
| 971 Expect.equals(0, metadata.length); | 963 Expect.equals(0, metadata.length); |
| 972 } | 964 } |
| 973 | 965 |
| 974 // class _PrivateClass { | 966 // class _PrivateClass { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1007 Expect.isTrue(privateSetter.isPrivate); | 999 Expect.isTrue(privateSetter.isPrivate); |
| 1008 Expect.isFalse(privateSetter.isRegularMethod); | 1000 Expect.isFalse(privateSetter.isRegularMethod); |
| 1009 | 1001 |
| 1010 var privateMethod = privateClass.members['_privateMethod']; | 1002 var privateMethod = privateClass.members['_privateMethod']; |
| 1011 Expect.isNotNull(privateMethod); | 1003 Expect.isNotNull(privateMethod); |
| 1012 Expect.isTrue(privateMethod is MethodMirror); | 1004 Expect.isTrue(privateMethod is MethodMirror); |
| 1013 Expect.isTrue(privateMethod.isPrivate); | 1005 Expect.isTrue(privateMethod.isPrivate); |
| 1014 Expect.isTrue(privateMethod.isRegularMethod); | 1006 Expect.isTrue(privateMethod.isRegularMethod); |
| 1015 | 1007 |
| 1016 var privateConstructor = | 1008 var privateConstructor = |
| 1017 privateClass.members['_PrivateClass._privateConstructor']; | 1009 privateClass.members['_privateConstructor']; |
| 1018 Expect.isNotNull(privateConstructor); | 1010 Expect.isNotNull(privateConstructor); |
| 1019 Expect.isTrue(privateConstructor is MethodMirror); | 1011 Expect.isTrue(privateConstructor is MethodMirror); |
| 1020 Expect.isTrue(privateConstructor.isConstructor); | 1012 Expect.isTrue(privateConstructor.isConstructor); |
| 1021 Expect.isTrue(privateConstructor.isPrivate); | 1013 Expect.isTrue(privateConstructor.isPrivate); |
| 1022 Expect.isFalse(privateConstructor.isConstConstructor); | 1014 Expect.isFalse(privateConstructor.isConstConstructor); |
| 1023 Expect.isFalse(privateConstructor.isRedirectingConstructor); | 1015 Expect.isFalse(privateConstructor.isRedirectingConstructor); |
| 1024 Expect.isTrue(privateConstructor.isGenerativeConstructor); | 1016 Expect.isTrue(privateConstructor.isGenerativeConstructor); |
| 1025 Expect.isFalse(privateConstructor.isFactoryConstructor); | 1017 Expect.isFalse(privateConstructor.isFactoryConstructor); |
| 1026 | 1018 |
| 1027 var privateFactoryConstructor = | 1019 var privateFactoryConstructor = |
| 1028 privateClass.members['_PrivateClass._privateFactoryConstructor']; | 1020 privateClass.members['_privateFactoryConstructor']; |
| 1029 Expect.isNotNull(privateFactoryConstructor); | 1021 Expect.isNotNull(privateFactoryConstructor); |
| 1030 Expect.isTrue(privateFactoryConstructor is MethodMirror); | 1022 Expect.isTrue(privateFactoryConstructor is MethodMirror); |
| 1031 Expect.isTrue(privateFactoryConstructor.isConstructor); | 1023 Expect.isTrue(privateFactoryConstructor.isConstructor); |
| 1032 Expect.isTrue(privateFactoryConstructor.isPrivate); | 1024 Expect.isTrue(privateFactoryConstructor.isPrivate); |
| 1033 Expect.isFalse(privateFactoryConstructor.isConstConstructor); | 1025 Expect.isFalse(privateFactoryConstructor.isConstConstructor); |
| 1034 Expect.isFalse(privateFactoryConstructor.isRedirectingConstructor); | 1026 Expect.isFalse(privateFactoryConstructor.isRedirectingConstructor); |
| 1035 Expect.isFalse(privateFactoryConstructor.isGenerativeConstructor); | 1027 Expect.isFalse(privateFactoryConstructor.isGenerativeConstructor); |
| 1036 Expect.isTrue(privateFactoryConstructor.isFactoryConstructor); | 1028 Expect.isTrue(privateFactoryConstructor.isFactoryConstructor); |
| 1037 | 1029 |
| 1038 var metadata = privateClass.metadata; | 1030 var metadata = privateClass.metadata; |
| 1039 Expect.isNotNull(metadata); | 1031 Expect.isNotNull(metadata); |
| 1040 Expect.equals(0, metadata.length); | 1032 Expect.equals(0, metadata.length); |
| 1041 } | 1033 } |
| OLD | NEW |