| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 library engine.element_test; | 3 library engine.element_test; |
| 4 import 'package:analyzer_experimental/src/generated/java_core.dart'; | 4 import 'package:analyzer_experimental/src/generated/java_core.dart'; |
| 5 import 'package:analyzer_experimental/src/generated/java_engine_io.dart'; | 5 import 'package:analyzer_experimental/src/generated/java_engine_io.dart'; |
| 6 import 'package:analyzer_experimental/src/generated/java_junit.dart'; | 6 import 'package:analyzer_experimental/src/generated/java_junit.dart'; |
| 7 import 'package:analyzer_experimental/src/generated/source_io.dart'; | 7 import 'package:analyzer_experimental/src/generated/source_io.dart'; |
| 8 import 'package:analyzer_experimental/src/generated/utilities_dart.dart'; | 8 import 'package:analyzer_experimental/src/generated/utilities_dart.dart'; |
| 9 import 'package:analyzer_experimental/src/generated/ast.dart'; | 9 import 'package:analyzer_experimental/src/generated/ast.dart'; |
| 10 import 'package:analyzer_experimental/src/generated/element.dart'; | 10 import 'package:analyzer_experimental/src/generated/element.dart'; |
| (...skipping 2479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2490 ClassElement a = ElementFactory.classElement2("A", []); | 2490 ClassElement a = ElementFactory.classElement2("A", []); |
| 2491 FunctionType t = ElementFactory.functionElement6("t", null, <ClassElement> [
a]).type; | 2491 FunctionType t = ElementFactory.functionElement6("t", null, <ClassElement> [
a]).type; |
| 2492 FunctionType s = ElementFactory.functionElement5("s", <ClassElement> [a]).ty
pe; | 2492 FunctionType s = ElementFactory.functionElement5("s", <ClassElement> [a]).ty
pe; |
| 2493 JUnitTestCase.assertTrue(t.isSubtypeOf(s)); | 2493 JUnitTestCase.assertTrue(t.isSubtypeOf(s)); |
| 2494 JUnitTestCase.assertFalse(s.isSubtypeOf(t)); | 2494 JUnitTestCase.assertFalse(s.isSubtypeOf(t)); |
| 2495 JUnitTestCase.assertTrue(t.isAssignableTo(s)); | 2495 JUnitTestCase.assertTrue(t.isAssignableTo(s)); |
| 2496 JUnitTestCase.assertFalse(s.isAssignableTo(t)); | 2496 JUnitTestCase.assertFalse(s.isAssignableTo(t)); |
| 2497 } | 2497 } |
| 2498 void test_isSubtypeOf_baseCase_classFunction() { | 2498 void test_isSubtypeOf_baseCase_classFunction() { |
| 2499 ClassElementImpl functionElement = ElementFactory.classElement2("Function",
[]); | 2499 ClassElementImpl functionElement = ElementFactory.classElement2("Function",
[]); |
| 2500 InterfaceTypeImpl functionType = new InterfaceTypeImpl_22(functionElement); | 2500 InterfaceTypeImpl functionType = new InterfaceTypeImpl_24(functionElement); |
| 2501 FunctionType f = ElementFactory.functionElement("f").type; | 2501 FunctionType f = ElementFactory.functionElement("f").type; |
| 2502 JUnitTestCase.assertTrue(f.isSubtypeOf(functionType)); | 2502 JUnitTestCase.assertTrue(f.isSubtypeOf(functionType)); |
| 2503 } | 2503 } |
| 2504 void test_isSubtypeOf_baseCase_notFunctionType() { | 2504 void test_isSubtypeOf_baseCase_notFunctionType() { |
| 2505 FunctionType f = ElementFactory.functionElement("f").type; | 2505 FunctionType f = ElementFactory.functionElement("f").type; |
| 2506 InterfaceType t = ElementFactory.classElement2("C", []).type; | 2506 InterfaceType t = ElementFactory.classElement2("C", []).type; |
| 2507 JUnitTestCase.assertFalse(f.isSubtypeOf(t)); | 2507 JUnitTestCase.assertFalse(f.isSubtypeOf(t)); |
| 2508 } | 2508 } |
| 2509 void test_isSubtypeOf_baseCase_null() { | 2509 void test_isSubtypeOf_baseCase_null() { |
| 2510 FunctionType f = ElementFactory.functionElement("f").type; | 2510 FunctionType f = ElementFactory.functionElement("f").type; |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2954 final __test = new FunctionTypeImplTest(); | 2954 final __test = new FunctionTypeImplTest(); |
| 2955 runJUnitTest(__test, __test.test_substitute2_equal); | 2955 runJUnitTest(__test, __test.test_substitute2_equal); |
| 2956 }); | 2956 }); |
| 2957 _ut.test('test_substitute2_notEqual', () { | 2957 _ut.test('test_substitute2_notEqual', () { |
| 2958 final __test = new FunctionTypeImplTest(); | 2958 final __test = new FunctionTypeImplTest(); |
| 2959 runJUnitTest(__test, __test.test_substitute2_notEqual); | 2959 runJUnitTest(__test, __test.test_substitute2_notEqual); |
| 2960 }); | 2960 }); |
| 2961 }); | 2961 }); |
| 2962 } | 2962 } |
| 2963 } | 2963 } |
| 2964 class InterfaceTypeImpl_22 extends InterfaceTypeImpl { | 2964 class InterfaceTypeImpl_24 extends InterfaceTypeImpl { |
| 2965 InterfaceTypeImpl_22(ClassElement arg0) : super.con1(arg0); | 2965 InterfaceTypeImpl_24(ClassElement arg0) : super.con1(arg0); |
| 2966 bool get isDartCoreFunction => true; | 2966 bool get isDartCoreFunction => true; |
| 2967 } | 2967 } |
| 2968 main() { | 2968 main() { |
| 2969 ElementKindTest.dartSuite(); | 2969 ElementKindTest.dartSuite(); |
| 2970 FunctionTypeImplTest.dartSuite(); | 2970 FunctionTypeImplTest.dartSuite(); |
| 2971 InterfaceTypeImplTest.dartSuite(); | 2971 InterfaceTypeImplTest.dartSuite(); |
| 2972 TypeParameterTypeImplTest.dartSuite(); | 2972 TypeParameterTypeImplTest.dartSuite(); |
| 2973 ClassElementImplTest.dartSuite(); | 2973 ClassElementImplTest.dartSuite(); |
| 2974 ElementLocationImplTest.dartSuite(); | 2974 ElementLocationImplTest.dartSuite(); |
| 2975 ElementImplTest.dartSuite(); | 2975 ElementImplTest.dartSuite(); |
| 2976 LibraryElementImplTest.dartSuite(); | 2976 LibraryElementImplTest.dartSuite(); |
| 2977 MultiplyDefinedElementImplTest.dartSuite(); | 2977 MultiplyDefinedElementImplTest.dartSuite(); |
| 2978 } | 2978 } |
| OLD | NEW |