| 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 library engine.resolver_test; | 5 library engine.resolver_test; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'package:analyzer/src/generated/java_core.dart'; | 8 import 'package:analyzer/src/generated/java_core.dart'; |
| 9 import 'package:analyzer/src/generated/java_junit.dart'; | 9 import 'package:analyzer/src/generated/java_junit.dart'; |
| 10 import 'package:analyzer/src/generated/java_engine.dart'; | 10 import 'package:analyzer/src/generated/java_engine.dart'; |
| (...skipping 3758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3769 classI1.accessors = <PropertyAccessorElement> [setter1]; | 3769 classI1.accessors = <PropertyAccessorElement> [setter1]; |
| 3770 ClassElementImpl classI2 = ElementFactory.classElement2("I2", []); | 3770 ClassElementImpl classI2 = ElementFactory.classElement2("I2", []); |
| 3771 PropertyAccessorElement setter2 = ElementFactory.setterElement(accessorName,
false, _typeProvider.numType); | 3771 PropertyAccessorElement setter2 = ElementFactory.setterElement(accessorName,
false, _typeProvider.numType); |
| 3772 classI2.accessors = <PropertyAccessorElement> [setter2]; | 3772 classI2.accessors = <PropertyAccessorElement> [setter2]; |
| 3773 ClassElementImpl classA = ElementFactory.classElement2("A", []); | 3773 ClassElementImpl classA = ElementFactory.classElement2("A", []); |
| 3774 classA.interfaces = <InterfaceType> [classI1.type, classI2.type]; | 3774 classA.interfaces = <InterfaceType> [classI1.type, classI2.type]; |
| 3775 MemberMap mapA = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(
classA); | 3775 MemberMap mapA = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(
classA); |
| 3776 JUnitTestCase.assertEquals(_numOfMembersInObject + 1, mapA.size); | 3776 JUnitTestCase.assertEquals(_numOfMembersInObject + 1, mapA.size); |
| 3777 PropertyAccessorElementImpl syntheticAccessor = ElementFactory.setterElement
(accessorName, false, _typeProvider.dynamicType); | 3777 PropertyAccessorElementImpl syntheticAccessor = ElementFactory.setterElement
(accessorName, false, _typeProvider.dynamicType); |
| 3778 syntheticAccessor.returnType = _typeProvider.dynamicType; | 3778 syntheticAccessor.returnType = _typeProvider.dynamicType; |
| 3779 JUnitTestCase.assertEquals(syntheticAccessor.type, mapA.get("${accessorName}
=").type); | 3779 JUnitTestCase.assertEquals(syntheticAccessor.type, mapA.get("$accessorName="
).type); |
| 3780 _assertNoErrors(classA); | 3780 _assertNoErrors(classA); |
| 3781 } | 3781 } |
| 3782 | 3782 |
| 3783 void test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_gett
ers() { | 3783 void test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_gett
ers() { |
| 3784 // class A {} | 3784 // class A {} |
| 3785 // class B extends A {} | 3785 // class B extends A {} |
| 3786 // class C extends B {} | 3786 // class C extends B {} |
| 3787 // class I1 { A get g; } | 3787 // class I1 { A get g; } |
| 3788 // class I2 { B get g; } | 3788 // class I2 { B get g; } |
| 3789 // class I3 { C get g; } | 3789 // class I3 { C get g; } |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3872 classI2.accessors = <PropertyAccessorElement> [setter2]; | 3872 classI2.accessors = <PropertyAccessorElement> [setter2]; |
| 3873 ClassElementImpl classI3 = ElementFactory.classElement2("I3", []); | 3873 ClassElementImpl classI3 = ElementFactory.classElement2("I3", []); |
| 3874 PropertyAccessorElement setter3 = ElementFactory.setterElement(accessorName,
false, classC.type); | 3874 PropertyAccessorElement setter3 = ElementFactory.setterElement(accessorName,
false, classC.type); |
| 3875 classI3.accessors = <PropertyAccessorElement> [setter3]; | 3875 classI3.accessors = <PropertyAccessorElement> [setter3]; |
| 3876 ClassElementImpl classD = ElementFactory.classElement2("D", []); | 3876 ClassElementImpl classD = ElementFactory.classElement2("D", []); |
| 3877 classD.interfaces = <InterfaceType> [classI1.type, classI2.type, classI3.typ
e]; | 3877 classD.interfaces = <InterfaceType> [classI1.type, classI2.type, classI3.typ
e]; |
| 3878 MemberMap mapD = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(
classD); | 3878 MemberMap mapD = _inheritanceManager.getMapOfMembersInheritedFromInterfaces(
classD); |
| 3879 JUnitTestCase.assertEquals(_numOfMembersInObject + 1, mapD.size); | 3879 JUnitTestCase.assertEquals(_numOfMembersInObject + 1, mapD.size); |
| 3880 PropertyAccessorElementImpl syntheticAccessor = ElementFactory.setterElement
(accessorName, false, _typeProvider.dynamicType); | 3880 PropertyAccessorElementImpl syntheticAccessor = ElementFactory.setterElement
(accessorName, false, _typeProvider.dynamicType); |
| 3881 syntheticAccessor.returnType = _typeProvider.dynamicType; | 3881 syntheticAccessor.returnType = _typeProvider.dynamicType; |
| 3882 JUnitTestCase.assertEquals(syntheticAccessor.type, mapD.get("${accessorName}
=").type); | 3882 JUnitTestCase.assertEquals(syntheticAccessor.type, mapD.get("$accessorName="
).type); |
| 3883 _assertNoErrors(classD); | 3883 _assertNoErrors(classD); |
| 3884 } | 3884 } |
| 3885 | 3885 |
| 3886 void test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_2_methods()
{ | 3886 void test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_2_methods()
{ |
| 3887 // class I1 { int m(); } | 3887 // class I1 { int m(); } |
| 3888 // class I2 { int m([int]); } | 3888 // class I2 { int m([int]); } |
| 3889 // class A implements I1, I2 {} | 3889 // class A implements I1, I2 {} |
| 3890 ClassElementImpl classI1 = ElementFactory.classElement2("I1", []); | 3890 ClassElementImpl classI1 = ElementFactory.classElement2("I1", []); |
| 3891 String methodName = "m"; | 3891 String methodName = "m"; |
| 3892 MethodElement methodM1 = ElementFactory.methodElement(methodName, _typeProvi
der.intType, []); | 3892 MethodElement methodM1 = ElementFactory.methodElement(methodName, _typeProvi
der.intType, []); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4002 _assertNoErrors(classB); | 4002 _assertNoErrors(classB); |
| 4003 } | 4003 } |
| 4004 | 4004 |
| 4005 void test_lookupInheritance_interface_setter() { | 4005 void test_lookupInheritance_interface_setter() { |
| 4006 ClassElementImpl classA = ElementFactory.classElement2("A", []); | 4006 ClassElementImpl classA = ElementFactory.classElement2("A", []); |
| 4007 String setterName = "s"; | 4007 String setterName = "s"; |
| 4008 PropertyAccessorElement setterS = ElementFactory.setterElement(setterName, f
alse, _typeProvider.intType); | 4008 PropertyAccessorElement setterS = ElementFactory.setterElement(setterName, f
alse, _typeProvider.intType); |
| 4009 classA.accessors = <PropertyAccessorElement> [setterS]; | 4009 classA.accessors = <PropertyAccessorElement> [setterS]; |
| 4010 ClassElementImpl classB = ElementFactory.classElement2("B", []); | 4010 ClassElementImpl classB = ElementFactory.classElement2("B", []); |
| 4011 classB.interfaces = <InterfaceType> [classA.type]; | 4011 classB.interfaces = <InterfaceType> [classA.type]; |
| 4012 JUnitTestCase.assertSame(setterS, _inheritanceManager.lookupInheritance(clas
sB, "${setterName}=")); | 4012 JUnitTestCase.assertSame(setterS, _inheritanceManager.lookupInheritance(clas
sB, "$setterName=")); |
| 4013 _assertNoErrors(classA); | 4013 _assertNoErrors(classA); |
| 4014 _assertNoErrors(classB); | 4014 _assertNoErrors(classB); |
| 4015 } | 4015 } |
| 4016 | 4016 |
| 4017 void test_lookupInheritance_interface_staticMember() { | 4017 void test_lookupInheritance_interface_staticMember() { |
| 4018 ClassElementImpl classA = ElementFactory.classElement2("A", []); | 4018 ClassElementImpl classA = ElementFactory.classElement2("A", []); |
| 4019 String methodName = "m"; | 4019 String methodName = "m"; |
| 4020 MethodElement methodM = ElementFactory.methodElement(methodName, _typeProvid
er.intType, []); | 4020 MethodElement methodM = ElementFactory.methodElement(methodName, _typeProvid
er.intType, []); |
| 4021 (methodM as MethodElementImpl).static = true; | 4021 (methodM as MethodElementImpl).static = true; |
| 4022 classA.methods = <MethodElement> [methodM]; | 4022 classA.methods = <MethodElement> [methodM]; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4087 _assertNoErrors(classB); | 4087 _assertNoErrors(classB); |
| 4088 } | 4088 } |
| 4089 | 4089 |
| 4090 void test_lookupInheritance_mixin_setter() { | 4090 void test_lookupInheritance_mixin_setter() { |
| 4091 ClassElementImpl classA = ElementFactory.classElement2("A", []); | 4091 ClassElementImpl classA = ElementFactory.classElement2("A", []); |
| 4092 String setterName = "s"; | 4092 String setterName = "s"; |
| 4093 PropertyAccessorElement setterS = ElementFactory.setterElement(setterName, f
alse, _typeProvider.intType); | 4093 PropertyAccessorElement setterS = ElementFactory.setterElement(setterName, f
alse, _typeProvider.intType); |
| 4094 classA.accessors = <PropertyAccessorElement> [setterS]; | 4094 classA.accessors = <PropertyAccessorElement> [setterS]; |
| 4095 ClassElementImpl classB = ElementFactory.classElement2("B", []); | 4095 ClassElementImpl classB = ElementFactory.classElement2("B", []); |
| 4096 classB.mixins = <InterfaceType> [classA.type]; | 4096 classB.mixins = <InterfaceType> [classA.type]; |
| 4097 JUnitTestCase.assertSame(setterS, _inheritanceManager.lookupInheritance(clas
sB, "${setterName}=")); | 4097 JUnitTestCase.assertSame(setterS, _inheritanceManager.lookupInheritance(clas
sB, "$setterName=")); |
| 4098 _assertNoErrors(classA); | 4098 _assertNoErrors(classA); |
| 4099 _assertNoErrors(classB); | 4099 _assertNoErrors(classB); |
| 4100 } | 4100 } |
| 4101 | 4101 |
| 4102 void test_lookupInheritance_mixin_staticMember() { | 4102 void test_lookupInheritance_mixin_staticMember() { |
| 4103 ClassElementImpl classA = ElementFactory.classElement2("A", []); | 4103 ClassElementImpl classA = ElementFactory.classElement2("A", []); |
| 4104 String methodName = "m"; | 4104 String methodName = "m"; |
| 4105 MethodElement methodM = ElementFactory.methodElement(methodName, _typeProvid
er.intType, []); | 4105 MethodElement methodM = ElementFactory.methodElement(methodName, _typeProvid
er.intType, []); |
| 4106 (methodM as MethodElementImpl).static = true; | 4106 (methodM as MethodElementImpl).static = true; |
| 4107 classA.methods = <MethodElement> [methodM]; | 4107 classA.methods = <MethodElement> [methodM]; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4156 _assertNoErrors(classA); | 4156 _assertNoErrors(classA); |
| 4157 _assertNoErrors(classB); | 4157 _assertNoErrors(classB); |
| 4158 } | 4158 } |
| 4159 | 4159 |
| 4160 void test_lookupInheritance_superclass_setter() { | 4160 void test_lookupInheritance_superclass_setter() { |
| 4161 ClassElementImpl classA = ElementFactory.classElement2("A", []); | 4161 ClassElementImpl classA = ElementFactory.classElement2("A", []); |
| 4162 String setterName = "s"; | 4162 String setterName = "s"; |
| 4163 PropertyAccessorElement setterS = ElementFactory.setterElement(setterName, f
alse, _typeProvider.intType); | 4163 PropertyAccessorElement setterS = ElementFactory.setterElement(setterName, f
alse, _typeProvider.intType); |
| 4164 classA.accessors = <PropertyAccessorElement> [setterS]; | 4164 classA.accessors = <PropertyAccessorElement> [setterS]; |
| 4165 ClassElementImpl classB = ElementFactory.classElement("B", classA.type, []); | 4165 ClassElementImpl classB = ElementFactory.classElement("B", classA.type, []); |
| 4166 JUnitTestCase.assertSame(setterS, _inheritanceManager.lookupInheritance(clas
sB, "${setterName}=")); | 4166 JUnitTestCase.assertSame(setterS, _inheritanceManager.lookupInheritance(clas
sB, "$setterName=")); |
| 4167 _assertNoErrors(classA); | 4167 _assertNoErrors(classA); |
| 4168 _assertNoErrors(classB); | 4168 _assertNoErrors(classB); |
| 4169 } | 4169 } |
| 4170 | 4170 |
| 4171 void test_lookupInheritance_superclass_staticMember() { | 4171 void test_lookupInheritance_superclass_staticMember() { |
| 4172 ClassElementImpl classA = ElementFactory.classElement2("A", []); | 4172 ClassElementImpl classA = ElementFactory.classElement2("A", []); |
| 4173 String methodName = "m"; | 4173 String methodName = "m"; |
| 4174 MethodElement methodM = ElementFactory.methodElement(methodName, _typeProvid
er.intType, []); | 4174 MethodElement methodM = ElementFactory.methodElement(methodName, _typeProvid
er.intType, []); |
| 4175 (methodM as MethodElementImpl).static = true; | 4175 (methodM as MethodElementImpl).static = true; |
| 4176 classA.methods = <MethodElement> [methodM]; | 4176 classA.methods = <MethodElement> [methodM]; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4221 ClassElementImpl classA = ElementFactory.classElement2("A", []); | 4221 ClassElementImpl classA = ElementFactory.classElement2("A", []); |
| 4222 JUnitTestCase.assertNull(_inheritanceManager.lookupMember(classA, "a")); | 4222 JUnitTestCase.assertNull(_inheritanceManager.lookupMember(classA, "a")); |
| 4223 _assertNoErrors(classA); | 4223 _assertNoErrors(classA); |
| 4224 } | 4224 } |
| 4225 | 4225 |
| 4226 void test_lookupMember_setter() { | 4226 void test_lookupMember_setter() { |
| 4227 ClassElementImpl classA = ElementFactory.classElement2("A", []); | 4227 ClassElementImpl classA = ElementFactory.classElement2("A", []); |
| 4228 String setterName = "s"; | 4228 String setterName = "s"; |
| 4229 PropertyAccessorElement setterS = ElementFactory.setterElement(setterName, f
alse, _typeProvider.intType); | 4229 PropertyAccessorElement setterS = ElementFactory.setterElement(setterName, f
alse, _typeProvider.intType); |
| 4230 classA.accessors = <PropertyAccessorElement> [setterS]; | 4230 classA.accessors = <PropertyAccessorElement> [setterS]; |
| 4231 JUnitTestCase.assertSame(setterS, _inheritanceManager.lookupMember(classA, "
${setterName}=")); | 4231 JUnitTestCase.assertSame(setterS, _inheritanceManager.lookupMember(classA, "
$setterName=")); |
| 4232 _assertNoErrors(classA); | 4232 _assertNoErrors(classA); |
| 4233 } | 4233 } |
| 4234 | 4234 |
| 4235 void test_lookupMember_setter_static() { | 4235 void test_lookupMember_setter_static() { |
| 4236 ClassElementImpl classA = ElementFactory.classElement2("A", []); | 4236 ClassElementImpl classA = ElementFactory.classElement2("A", []); |
| 4237 String setterName = "s"; | 4237 String setterName = "s"; |
| 4238 PropertyAccessorElement setterS = ElementFactory.setterElement(setterName, t
rue, _typeProvider.intType); | 4238 PropertyAccessorElement setterS = ElementFactory.setterElement(setterName, t
rue, _typeProvider.intType); |
| 4239 classA.accessors = <PropertyAccessorElement> [setterS]; | 4239 classA.accessors = <PropertyAccessorElement> [setterS]; |
| 4240 JUnitTestCase.assertNull(_inheritanceManager.lookupMember(classA, setterName
)); | 4240 JUnitTestCase.assertNull(_inheritanceManager.lookupMember(classA, setterName
)); |
| 4241 _assertNoErrors(classA); | 4241 _assertNoErrors(classA); |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4474 for (ClassElement type in types) { | 4474 for (ClassElement type in types) { |
| 4475 JUnitTestCase.assertNotNull(type); | 4475 JUnitTestCase.assertNotNull(type); |
| 4476 String actualTypeName = type.displayName; | 4476 String actualTypeName = type.displayName; |
| 4477 bool wasExpected = false; | 4477 bool wasExpected = false; |
| 4478 for (String expectedTypeName in typeNames) { | 4478 for (String expectedTypeName in typeNames) { |
| 4479 if (expectedTypeName == actualTypeName) { | 4479 if (expectedTypeName == actualTypeName) { |
| 4480 wasExpected = true; | 4480 wasExpected = true; |
| 4481 } | 4481 } |
| 4482 } | 4482 } |
| 4483 if (!wasExpected) { | 4483 if (!wasExpected) { |
| 4484 JUnitTestCase.fail("Found unexpected type ${actualTypeName}"); | 4484 JUnitTestCase.fail("Found unexpected type $actualTypeName"); |
| 4485 } | 4485 } |
| 4486 } | 4486 } |
| 4487 } | 4487 } |
| 4488 | 4488 |
| 4489 /** | 4489 /** |
| 4490 * Build the element model for the library whose defining compilation unit has
the given source. | 4490 * Build the element model for the library whose defining compilation unit has
the given source. |
| 4491 * | 4491 * |
| 4492 * @param librarySource the source of the defining compilation unit for the li
brary | 4492 * @param librarySource the source of the defining compilation unit for the li
brary |
| 4493 * @param expectedErrorCodes the errors that are expected to be found while bu
ilding the element | 4493 * @param expectedErrorCodes the errors that are expected to be found while bu
ilding the element |
| 4494 * model | 4494 * model |
| (...skipping 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6287 * | 6287 * |
| 6288 * @param libraryName the name of the library to be created | 6288 * @param libraryName the name of the library to be created |
| 6289 * @return the library element that was created | 6289 * @return the library element that was created |
| 6290 */ | 6290 */ |
| 6291 LibraryElementImpl createTestLibrary(AnalysisContext context, String libraryNa
me, List<String> typeNames) { | 6291 LibraryElementImpl createTestLibrary(AnalysisContext context, String libraryNa
me, List<String> typeNames) { |
| 6292 int count = typeNames.length; | 6292 int count = typeNames.length; |
| 6293 List<CompilationUnitElementImpl> sourcedCompilationUnits = new List<Compilat
ionUnitElementImpl>(count); | 6293 List<CompilationUnitElementImpl> sourcedCompilationUnits = new List<Compilat
ionUnitElementImpl>(count); |
| 6294 for (int i = 0; i < count; i++) { | 6294 for (int i = 0; i < count; i++) { |
| 6295 String typeName = typeNames[i]; | 6295 String typeName = typeNames[i]; |
| 6296 ClassElementImpl type = new ClassElementImpl.forNode(AstFactory.identifier
3(typeName)); | 6296 ClassElementImpl type = new ClassElementImpl.forNode(AstFactory.identifier
3(typeName)); |
| 6297 String fileName = "${typeName}.dart"; | 6297 String fileName = "$typeName.dart"; |
| 6298 CompilationUnitElementImpl compilationUnit = new CompilationUnitElementImp
l(fileName); | 6298 CompilationUnitElementImpl compilationUnit = new CompilationUnitElementImp
l(fileName); |
| 6299 compilationUnit.source = _createNamedSource(fileName); | 6299 compilationUnit.source = _createNamedSource(fileName); |
| 6300 compilationUnit.types = <ClassElement> [type]; | 6300 compilationUnit.types = <ClassElement> [type]; |
| 6301 sourcedCompilationUnits[i] = compilationUnit; | 6301 sourcedCompilationUnits[i] = compilationUnit; |
| 6302 } | 6302 } |
| 6303 String fileName = "${libraryName}.dart"; | 6303 String fileName = "$libraryName.dart"; |
| 6304 CompilationUnitElementImpl compilationUnit = new CompilationUnitElementImpl(
fileName); | 6304 CompilationUnitElementImpl compilationUnit = new CompilationUnitElementImpl(
fileName); |
| 6305 compilationUnit.source = _createNamedSource(fileName); | 6305 compilationUnit.source = _createNamedSource(fileName); |
| 6306 LibraryElementImpl library = new LibraryElementImpl.forNode(context, AstFact
ory.libraryIdentifier2([libraryName])); | 6306 LibraryElementImpl library = new LibraryElementImpl.forNode(context, AstFact
ory.libraryIdentifier2([libraryName])); |
| 6307 library.definingCompilationUnit = compilationUnit; | 6307 library.definingCompilationUnit = compilationUnit; |
| 6308 library.parts = sourcedCompilationUnits; | 6308 library.parts = sourcedCompilationUnits; |
| 6309 return library; | 6309 return library; |
| 6310 } | 6310 } |
| 6311 | 6311 |
| 6312 /** | 6312 /** |
| 6313 * Enable optionally strict union types for the current test. | 6313 * Enable optionally strict union types for the current test. |
| (...skipping 4727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11041 assertNoErrors(source); | 11041 assertNoErrors(source); |
| 11042 verify([source]); | 11042 verify([source]); |
| 11043 CompilationUnit unit = resolveCompilationUnit(source, library); | 11043 CompilationUnit unit = resolveCompilationUnit(source, library); |
| 11044 // Could generalize this further by making [SimpleIdentifier.class] a para
meter. | 11044 // Could generalize this further by making [SimpleIdentifier.class] a para
meter. |
| 11045 return EngineTestCase.findNode(unit, code, marker, (node) => node is Simpl
eIdentifier); | 11045 return EngineTestCase.findNode(unit, code, marker, (node) => node is Simpl
eIdentifier); |
| 11046 } catch (exception) { | 11046 } catch (exception) { |
| 11047 // Is there a better exception to throw here? The point is that an asserti
on failure | 11047 // Is there a better exception to throw here? The point is that an asserti
on failure |
| 11048 // here should be a failure, in both "test_*" and "fail_*" tests. | 11048 // here should be a failure, in both "test_*" and "fail_*" tests. |
| 11049 // However, an assertion failure is success for the purpose of "fail_*" te
sts, so | 11049 // However, an assertion failure is success for the purpose of "fail_*" te
sts, so |
| 11050 // without catching them here "fail_*" tests can succeed by failing for th
e wrong reason. | 11050 // without catching them here "fail_*" tests can succeed by failing for th
e wrong reason. |
| 11051 throw new JavaException("Unexexpected assertion failure: ${exception}"); | 11051 throw new JavaException("Unexexpected assertion failure: $exception"); |
| 11052 } | 11052 } |
| 11053 } | 11053 } |
| 11054 } | 11054 } |
| 11055 | 11055 |
| 11056 class TypeProviderImplTest extends EngineTestCase { | 11056 class TypeProviderImplTest extends EngineTestCase { |
| 11057 void test_creation() { | 11057 void test_creation() { |
| 11058 // | 11058 // |
| 11059 // Create a mock library element with the types expected to be in dart:core.
We cannot use | 11059 // Create a mock library element with the types expected to be in dart:core.
We cannot use |
| 11060 // either ElementFactory or TestTypeProvider (which uses ElementFactory) bec
ause we side-effect | 11060 // either ElementFactory or TestTypeProvider (which uses ElementFactory) bec
ause we side-effect |
| 11061 // the elements in ways that would break other tests. | 11061 // the elements in ways that would break other tests. |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11492 runReflectiveTests(TypeResolverVisitorTest); | 11492 runReflectiveTests(TypeResolverVisitorTest); |
| 11493 runReflectiveTests(CheckedModeCompileTimeErrorCodeTest); | 11493 runReflectiveTests(CheckedModeCompileTimeErrorCodeTest); |
| 11494 runReflectiveTests(ErrorResolverTest); | 11494 runReflectiveTests(ErrorResolverTest); |
| 11495 runReflectiveTests(HintCodeTest); | 11495 runReflectiveTests(HintCodeTest); |
| 11496 runReflectiveTests(MemberMapTest); | 11496 runReflectiveTests(MemberMapTest); |
| 11497 runReflectiveTests(NonHintCodeTest); | 11497 runReflectiveTests(NonHintCodeTest); |
| 11498 runReflectiveTests(SimpleResolverTest); | 11498 runReflectiveTests(SimpleResolverTest); |
| 11499 runReflectiveTests(StrictModeTest); | 11499 runReflectiveTests(StrictModeTest); |
| 11500 runReflectiveTests(TypePropagationTest); | 11500 runReflectiveTests(TypePropagationTest); |
| 11501 } | 11501 } |
| OLD | NEW |