| OLD | NEW |
| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.element_test; | 8 library engine.element_test; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/java_core.dart'; | 10 import 'package:analyzer/src/generated/java_core.dart'; |
| (...skipping 2945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2956 JUnitTestCase.assertFalse(typeAK.isSubtypeOf(typeAI)); | 2956 JUnitTestCase.assertFalse(typeAK.isSubtypeOf(typeAI)); |
| 2957 } | 2957 } |
| 2958 | 2958 |
| 2959 void test_isSubtypeOf_typeParameter() { | 2959 void test_isSubtypeOf_typeParameter() { |
| 2960 // | 2960 // |
| 2961 // class A<E> {} | 2961 // class A<E> {} |
| 2962 // | 2962 // |
| 2963 ClassElement classA = ElementFactory.classElement2("A", ["E"]); | 2963 ClassElement classA = ElementFactory.classElement2("A", ["E"]); |
| 2964 InterfaceType typeA = classA.type; | 2964 InterfaceType typeA = classA.type; |
| 2965 TypeParameterType parameterType = classA.typeParameters[0].type; | 2965 TypeParameterType parameterType = classA.typeParameters[0].type; |
| 2966 DartType dynamicType = DynamicTypeImpl.instance; | |
| 2967 JUnitTestCase.assertFalse(typeA.isSubtypeOf(parameterType)); | 2966 JUnitTestCase.assertFalse(typeA.isSubtypeOf(parameterType)); |
| 2968 JUnitTestCase.assertTrue(dynamicType.isSubtypeOf(parameterType)); | |
| 2969 } | 2967 } |
| 2970 | 2968 |
| 2971 void test_isSupertypeOf_directSupertype() { | 2969 void test_isSupertypeOf_directSupertype() { |
| 2972 ClassElement classA = ElementFactory.classElement2("A", []); | 2970 ClassElement classA = ElementFactory.classElement2("A", []); |
| 2973 ClassElement classB = ElementFactory.classElement("B", classA.type, []); | 2971 ClassElement classB = ElementFactory.classElement("B", classA.type, []); |
| 2974 InterfaceType typeA = classA.type; | 2972 InterfaceType typeA = classA.type; |
| 2975 InterfaceType typeB = classB.type; | 2973 InterfaceType typeB = classB.type; |
| 2976 JUnitTestCase.assertFalse(typeB.isSupertypeOf(typeA)); | 2974 JUnitTestCase.assertFalse(typeB.isSupertypeOf(typeA)); |
| 2977 JUnitTestCase.assertTrue(typeA.isSupertypeOf(typeB)); | 2975 JUnitTestCase.assertTrue(typeA.isSupertypeOf(typeB)); |
| 2978 } | 2976 } |
| (...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4222 InterfaceTypeImplTest.dartSuite(); | 4220 InterfaceTypeImplTest.dartSuite(); |
| 4223 TypeParameterTypeImplTest.dartSuite(); | 4221 TypeParameterTypeImplTest.dartSuite(); |
| 4224 VoidTypeImplTest.dartSuite(); | 4222 VoidTypeImplTest.dartSuite(); |
| 4225 ClassElementImplTest.dartSuite(); | 4223 ClassElementImplTest.dartSuite(); |
| 4226 ElementLocationImplTest.dartSuite(); | 4224 ElementLocationImplTest.dartSuite(); |
| 4227 ElementImplTest.dartSuite(); | 4225 ElementImplTest.dartSuite(); |
| 4228 HtmlElementImplTest.dartSuite(); | 4226 HtmlElementImplTest.dartSuite(); |
| 4229 LibraryElementImplTest.dartSuite(); | 4227 LibraryElementImplTest.dartSuite(); |
| 4230 MultiplyDefinedElementImplTest.dartSuite(); | 4228 MultiplyDefinedElementImplTest.dartSuite(); |
| 4231 } | 4229 } |
| OLD | NEW |