| 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 2364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2375 ClassElement a = ElementFactory.classElement2("A", []); | 2375 ClassElement a = ElementFactory.classElement2("A", []); |
| 2376 FunctionType t = ElementFactory.functionElement6("t", null, <ClassElement> [
a]).type; | 2376 FunctionType t = ElementFactory.functionElement6("t", null, <ClassElement> [
a]).type; |
| 2377 FunctionType s = ElementFactory.functionElement5("s", <ClassElement> [a]).ty
pe; | 2377 FunctionType s = ElementFactory.functionElement5("s", <ClassElement> [a]).ty
pe; |
| 2378 JUnitTestCase.assertTrue(t.isSubtypeOf(s)); | 2378 JUnitTestCase.assertTrue(t.isSubtypeOf(s)); |
| 2379 JUnitTestCase.assertFalse(s.isSubtypeOf(t)); | 2379 JUnitTestCase.assertFalse(s.isSubtypeOf(t)); |
| 2380 JUnitTestCase.assertTrue(t.isAssignableTo(s)); | 2380 JUnitTestCase.assertTrue(t.isAssignableTo(s)); |
| 2381 JUnitTestCase.assertFalse(s.isAssignableTo(t)); | 2381 JUnitTestCase.assertFalse(s.isAssignableTo(t)); |
| 2382 } | 2382 } |
| 2383 void test_isSubtypeOf_baseCase_classFunction() { | 2383 void test_isSubtypeOf_baseCase_classFunction() { |
| 2384 ClassElementImpl functionElement = ElementFactory.classElement2("Function",
[]); | 2384 ClassElementImpl functionElement = ElementFactory.classElement2("Function",
[]); |
| 2385 InterfaceTypeImpl functionType = new InterfaceTypeImpl_21(functionElement); | 2385 InterfaceTypeImpl functionType = new InterfaceTypeImpl_25(functionElement); |
| 2386 FunctionType f = ElementFactory.functionElement("f").type; | 2386 FunctionType f = ElementFactory.functionElement("f").type; |
| 2387 JUnitTestCase.assertTrue(f.isSubtypeOf(functionType)); | 2387 JUnitTestCase.assertTrue(f.isSubtypeOf(functionType)); |
| 2388 } | 2388 } |
| 2389 void test_isSubtypeOf_baseCase_notFunctionType() { | 2389 void test_isSubtypeOf_baseCase_notFunctionType() { |
| 2390 FunctionType f = ElementFactory.functionElement("f").type; | 2390 FunctionType f = ElementFactory.functionElement("f").type; |
| 2391 InterfaceType t = ElementFactory.classElement2("C", []).type; | 2391 InterfaceType t = ElementFactory.classElement2("C", []).type; |
| 2392 JUnitTestCase.assertFalse(f.isSubtypeOf(t)); | 2392 JUnitTestCase.assertFalse(f.isSubtypeOf(t)); |
| 2393 } | 2393 } |
| 2394 void test_isSubtypeOf_baseCase_null() { | 2394 void test_isSubtypeOf_baseCase_null() { |
| 2395 FunctionType f = ElementFactory.functionElement("f").type; | 2395 FunctionType f = ElementFactory.functionElement("f").type; |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2839 final __test = new FunctionTypeImplTest(); | 2839 final __test = new FunctionTypeImplTest(); |
| 2840 runJUnitTest(__test, __test.test_substitute2_equal); | 2840 runJUnitTest(__test, __test.test_substitute2_equal); |
| 2841 }); | 2841 }); |
| 2842 _ut.test('test_substitute2_notEqual', () { | 2842 _ut.test('test_substitute2_notEqual', () { |
| 2843 final __test = new FunctionTypeImplTest(); | 2843 final __test = new FunctionTypeImplTest(); |
| 2844 runJUnitTest(__test, __test.test_substitute2_notEqual); | 2844 runJUnitTest(__test, __test.test_substitute2_notEqual); |
| 2845 }); | 2845 }); |
| 2846 }); | 2846 }); |
| 2847 } | 2847 } |
| 2848 } | 2848 } |
| 2849 class InterfaceTypeImpl_21 extends InterfaceTypeImpl { | 2849 class InterfaceTypeImpl_25 extends InterfaceTypeImpl { |
| 2850 InterfaceTypeImpl_21(ClassElement arg0) : super.con1(arg0); | 2850 InterfaceTypeImpl_25(ClassElement arg0) : super.con1(arg0); |
| 2851 bool get isDartCoreFunction => true; | 2851 bool get isDartCoreFunction => true; |
| 2852 } | 2852 } |
| 2853 main() { | 2853 main() { |
| 2854 ElementKindTest.dartSuite(); | 2854 ElementKindTest.dartSuite(); |
| 2855 FunctionTypeImplTest.dartSuite(); | 2855 FunctionTypeImplTest.dartSuite(); |
| 2856 InterfaceTypeImplTest.dartSuite(); | 2856 InterfaceTypeImplTest.dartSuite(); |
| 2857 TypeVariableTypeImplTest.dartSuite(); | 2857 TypeVariableTypeImplTest.dartSuite(); |
| 2858 ClassElementImplTest.dartSuite(); | 2858 ClassElementImplTest.dartSuite(); |
| 2859 ElementLocationImplTest.dartSuite(); | 2859 ElementLocationImplTest.dartSuite(); |
| 2860 ElementImplTest.dartSuite(); | 2860 ElementImplTest.dartSuite(); |
| 2861 LibraryElementImplTest.dartSuite(); | 2861 LibraryElementImplTest.dartSuite(); |
| 2862 } | 2862 } |
| OLD | NEW |