| Index: pkg/analyzer/test/generated/resolver_test.dart
|
| diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
|
| index b512ceb206dd68a9f4f6b381e8f19574688899e1..ad1dffc7c36817cded933422f6630a014e541cd0 100644
|
| --- a/pkg/analyzer/test/generated/resolver_test.dart
|
| +++ b/pkg/analyzer/test/generated/resolver_test.dart
|
| @@ -272,9 +272,9 @@ class AnalysisContextFactory {
|
| ElementFactory.classElement("SelectElement", elementType)
|
| ];
|
| htmlUnit.functions = <FunctionElement>[
|
| - ElementFactory.functionElement3("query", elementElement, <ClassElement>[
|
| - provider.stringType.element
|
| - ], ClassElementImpl.EMPTY_ARRAY)
|
| + ElementFactory.functionElement3("query", elementElement,
|
| + <ClassElement>[provider.stringType.element],
|
| + ClassElementImpl.EMPTY_ARRAY)
|
| ];
|
| TopLevelVariableElementImpl document = ElementFactory
|
| .topLevelVariableElement3(
|
| @@ -293,9 +293,8 @@ class AnalysisContextFactory {
|
| coreContext.setContents(mathSource, "");
|
| mathUnit.source = mathSource;
|
| FunctionElement cosElement = ElementFactory.functionElement3("cos",
|
| - provider.doubleType.element, <ClassElement>[
|
| - provider.numType.element
|
| - ], ClassElementImpl.EMPTY_ARRAY);
|
| + provider.doubleType.element, <ClassElement>[provider.numType.element],
|
| + ClassElementImpl.EMPTY_ARRAY);
|
| TopLevelVariableElement ln10Element = ElementFactory
|
| .topLevelVariableElement3("LN10", true, false, provider.doubleType);
|
| TopLevelVariableElement piElement = ElementFactory.topLevelVariableElement3(
|
| @@ -311,13 +310,11 @@ class AnalysisContextFactory {
|
| randomConstructor.parameters = <ParameterElement>[seedParam];
|
| randomElement.constructors = <ConstructorElement>[randomConstructor];
|
| FunctionElement sinElement = ElementFactory.functionElement3("sin",
|
| - provider.doubleType.element, <ClassElement>[
|
| - provider.numType.element
|
| - ], ClassElementImpl.EMPTY_ARRAY);
|
| + provider.doubleType.element, <ClassElement>[provider.numType.element],
|
| + ClassElementImpl.EMPTY_ARRAY);
|
| FunctionElement sqrtElement = ElementFactory.functionElement3("sqrt",
|
| - provider.doubleType.element, <ClassElement>[
|
| - provider.numType.element
|
| - ], ClassElementImpl.EMPTY_ARRAY);
|
| + provider.doubleType.element, <ClassElement>[provider.numType.element],
|
| + ClassElementImpl.EMPTY_ARRAY);
|
| mathUnit.accessors = <PropertyAccessorElement>[
|
| ln10Element.getter,
|
| piElement.getter
|
| @@ -1537,9 +1534,8 @@ class ElementResolverTest extends EngineTestCase {
|
| AstFactory.typeName(classA), constructorName);
|
| name.staticElement = constructor;
|
| InstanceCreationExpression creation = AstFactory.instanceCreationExpression(
|
| - Keyword.NEW, name, [
|
| - AstFactory.namedExpression2(parameterName, AstFactory.integer(0))
|
| - ]);
|
| + Keyword.NEW, name,
|
| + [AstFactory.namedExpression2(parameterName, AstFactory.integer(0))]);
|
| _resolveNode(creation);
|
| expect(creation.staticElement, same(constructor));
|
| expect((creation.argumentList.arguments[
|
| @@ -4659,9 +4655,8 @@ class InheritanceManagerTest extends EngineTestCase {
|
| _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
|
| expect(mapA.size, _numOfMembersInObject);
|
| expect(mapA.get(methodName), isNull);
|
| - _assertErrors(classA, [
|
| - StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD
|
| - ]);
|
| + _assertErrors(classA,
|
| + [StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD]);
|
| }
|
|
|
| void test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_int_str() {
|
| @@ -4706,9 +4701,8 @@ class InheritanceManagerTest extends EngineTestCase {
|
| _inheritanceManager.getMapOfMembersInheritedFromInterfaces(classA);
|
| expect(mapA.size, _numOfMembersInObject);
|
| expect(mapA.get(methodName), isNull);
|
| - _assertErrors(classA, [
|
| - StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD
|
| - ]);
|
| + _assertErrors(classA,
|
| + [StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD]);
|
| }
|
|
|
| void test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_numOfRequiredParams() {
|
| @@ -6077,7 +6071,8 @@ class LibraryScopeTest extends ResolverTestCase {
|
| void test_creation_empty() {
|
| LibraryElement definingLibrary = createDefaultTestLibrary();
|
| GatheringErrorListener errorListener = new GatheringErrorListener();
|
| - new LibraryScope(definingLibrary, errorListener);
|
| + new LibraryScope(definingLibrary,
|
| + new LibraryImportScope(definingLibrary, errorListener), errorListener);
|
| }
|
|
|
| void test_creation_nonEmpty() {
|
| @@ -6095,7 +6090,8 @@ class LibraryScopeTest extends ResolverTestCase {
|
| importElement.importedLibrary = importedLibrary;
|
| definingLibrary.imports = <ImportElement>[importElement];
|
| GatheringErrorListener errorListener = new GatheringErrorListener();
|
| - Scope scope = new LibraryScope(definingLibrary, errorListener);
|
| + Scope scope = new LibraryScope(definingLibrary,
|
| + new LibraryImportScope(definingLibrary, errorListener), errorListener);
|
| expect(
|
| scope.lookup(AstFactory.identifier3(importedTypeName), definingLibrary),
|
| importedType);
|
| @@ -6104,7 +6100,8 @@ class LibraryScopeTest extends ResolverTestCase {
|
| void test_getErrorListener() {
|
| LibraryElement definingLibrary = createDefaultTestLibrary();
|
| GatheringErrorListener errorListener = new GatheringErrorListener();
|
| - LibraryScope scope = new LibraryScope(definingLibrary, errorListener);
|
| + LibraryScope scope = new LibraryScope(definingLibrary,
|
| + new LibraryImportScope(definingLibrary, errorListener), errorListener);
|
| expect(scope.errorListener, errorListener);
|
| }
|
| }
|
| @@ -9995,8 +9992,10 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
|
| _analyze5(p1);
|
| _analyze5(p2);
|
| DartType resultType = _analyze(node);
|
| - _assertFunctionType(dynamicType,
|
| - <DartType>[dynamicType, dynamicType], null, null, resultType);
|
| + _assertFunctionType(dynamicType, <DartType>[
|
| + dynamicType,
|
| + dynamicType
|
| + ], null, null, resultType);
|
| _listener.assertNoErrors();
|
| }
|
|
|
| @@ -10030,8 +10029,8 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
|
| DartType resultType = _analyze(node);
|
| Map<String, DartType> expectedNamedTypes = new HashMap<String, DartType>();
|
| expectedNamedTypes["p2"] = dynamicType;
|
| - _assertFunctionType(dynamicType,
|
| - <DartType>[dynamicType], null, expectedNamedTypes, resultType);
|
| + _assertFunctionType(dynamicType, <DartType>[dynamicType], null,
|
| + expectedNamedTypes, resultType);
|
| _listener.assertNoErrors();
|
| }
|
|
|
| @@ -10050,8 +10049,8 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
|
| DartType resultType = _analyze(node);
|
| Map<String, DartType> expectedNamedTypes = new HashMap<String, DartType>();
|
| expectedNamedTypes["p2"] = dynamicType;
|
| - _assertFunctionType(_typeProvider.intType,
|
| - <DartType>[dynamicType], null, expectedNamedTypes, resultType);
|
| + _assertFunctionType(_typeProvider.intType, <DartType>[dynamicType], null,
|
| + expectedNamedTypes, resultType);
|
| _listener.assertNoErrors();
|
| }
|
|
|
| @@ -10069,8 +10068,8 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
|
| _analyze5(p1);
|
| _analyze5(p2);
|
| DartType resultType = _analyze(node);
|
| - _assertFunctionType(dynamicType,
|
| - <DartType>[dynamicType], <DartType>[dynamicType], null, resultType);
|
| + _assertFunctionType(dynamicType, <DartType>[dynamicType],
|
| + <DartType>[dynamicType], null, resultType);
|
| _listener.assertNoErrors();
|
| }
|
|
|
| @@ -10088,8 +10087,8 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
|
| _analyze5(p1);
|
| _analyze5(p2);
|
| DartType resultType = _analyze(node);
|
| - _assertFunctionType(_typeProvider.intType,
|
| - <DartType>[dynamicType], <DartType>[dynamicType], null, resultType);
|
| + _assertFunctionType(_typeProvider.intType, <DartType>[dynamicType],
|
| + <DartType>[dynamicType], null, resultType);
|
| _listener.assertNoErrors();
|
| }
|
|
|
| @@ -10108,8 +10107,10 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
|
| _analyze5(p1);
|
| _analyze5(p2);
|
| DartType resultType = _analyze(node);
|
| - _assertFunctionType(dynamicType,
|
| - null, <DartType>[dynamicType, dynamicType], null, resultType);
|
| + _assertFunctionType(dynamicType, null, <DartType>[
|
| + dynamicType,
|
| + dynamicType
|
| + ], null, resultType);
|
| _listener.assertNoErrors();
|
| }
|
|
|
| @@ -10212,9 +10213,8 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
|
| constructor.type = constructorType;
|
| classElement.constructors = <ConstructorElement>[constructor];
|
| InstanceCreationExpression node = AstFactory.instanceCreationExpression2(
|
| - null, AstFactory.typeName(classElement), [
|
| - AstFactory.identifier3(constructorName)
|
| - ]);
|
| + null, AstFactory.typeName(classElement),
|
| + [AstFactory.identifier3(constructorName)]);
|
| node.staticElement = constructor;
|
| expect(_analyze(node), same(classElement.type));
|
| _listener.assertNoErrors();
|
| @@ -10304,10 +10304,9 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
|
| // {}
|
| Expression node = AstFactory.mapLiteral2();
|
| DartType resultType = _analyze(node);
|
| - _assertType2(_typeProvider.mapType.substitute4(<DartType>[
|
| - _typeProvider.dynamicType,
|
| - _typeProvider.dynamicType
|
| - ]), resultType);
|
| + _assertType2(_typeProvider.mapType.substitute4(
|
| + <DartType>[_typeProvider.dynamicType, _typeProvider.dynamicType]),
|
| + resultType);
|
| _listener.assertNoErrors();
|
| }
|
|
|
| @@ -10316,10 +10315,9 @@ class StaticTypeAnalyzerTest extends EngineTestCase {
|
| Expression node = AstFactory
|
| .mapLiteral2([AstFactory.mapLiteralEntry("k", _resolvedInteger(0))]);
|
| DartType resultType = _analyze(node);
|
| - _assertType2(_typeProvider.mapType.substitute4(<DartType>[
|
| - _typeProvider.dynamicType,
|
| - _typeProvider.dynamicType
|
| - ]), resultType);
|
| + _assertType2(_typeProvider.mapType.substitute4(
|
| + <DartType>[_typeProvider.dynamicType, _typeProvider.dynamicType]),
|
| + resultType);
|
| _listener.assertNoErrors();
|
| }
|
|
|
|
|