Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Unified Diff: pkg/analyzer/test/generated/resolver_test.dart

Issue 1513643009: Clean up package imports and library names (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | pkg/analyzer/test/generated/scanner_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ecbbb2b99e5724618e4e4fff23a9c702bf92afa7..b6defbd81c7bf8b440c0f5541fcdca6d3ecdba65 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library engine.resolver_test;
+library analyzer.test.generated.resolver_test;
import 'dart:collection';
@@ -193,8 +193,8 @@ class AnalysisContextFactory {
'onValue', futureThenR, [futureElement.typeParameters[0]], null);
DartType futureRType = futureElement.type.substitute4([futureThenR.type]);
- MethodElementImpl thenMethod = ElementFactory.methodElementWithParameters(
- futureElement, "then", futureRType, [
+ MethodElementImpl thenMethod = ElementFactory
+ .methodElementWithParameters(futureElement, "then", futureRType, [
ElementFactory.requiredParameter2("onValue", thenOnValue.type),
ElementFactory.namedParameter2("onError", provider.functionType)
]);
@@ -282,8 +282,8 @@ class AnalysisContextFactory {
ClassElementImpl htmlDocumentElement =
ElementFactory.classElement("HtmlDocument", documentElement.type);
htmlDocumentElement.methods = <MethodElement>[
- ElementFactory.methodElement(
- "query", elementType, <DartType>[provider.stringType])
+ ElementFactory
+ .methodElement("query", elementType, <DartType>[provider.stringType])
];
htmlUnit.types = <ClassElement>[
ElementFactory.classElement("AnchorElement", elementType),
@@ -303,8 +303,8 @@ class AnalysisContextFactory {
ElementFactory.functionElement3("query", elementElement,
<ClassElement>[provider.stringType.element], ClassElement.EMPTY_LIST)
];
- TopLevelVariableElementImpl document = ElementFactory
- .topLevelVariableElement3(
+ TopLevelVariableElementImpl document =
+ ElementFactory.topLevelVariableElement3(
"document", false, true, htmlDocumentElement.type);
htmlUnit.topLevelVariables = <TopLevelVariableElement>[document];
htmlUnit.accessors = <PropertyAccessorElement>[document.getter];
@@ -5087,7 +5087,8 @@ class InheritanceManagerTest {
_assertNoErrors(classA);
}
- void test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_getter_method() {
+ void
+ test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_getter_method() {
// class I1 { int m(); }
// class I2 { int get m; }
// class A implements I2, I1 {}
@@ -5110,7 +5111,8 @@ class InheritanceManagerTest {
[StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD]);
}
- void test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_int_str() {
+ void
+ test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_int_str() {
// class I1 { int m(); }
// class I2 { String m(); }
// class A implements I1, I2 {}
@@ -5120,8 +5122,8 @@ class InheritanceManagerTest {
ElementFactory.methodElement(methodName, null, [_typeProvider.intType]);
classI1.methods = <MethodElement>[methodM1];
ClassElementImpl classI2 = ElementFactory.classElement2("I2");
- MethodElement methodM2 = ElementFactory.methodElement(
- methodName, null, [_typeProvider.stringType]);
+ MethodElement methodM2 = ElementFactory
+ .methodElement(methodName, null, [_typeProvider.stringType]);
classI2.methods = <MethodElement>[methodM2];
ClassElementImpl classA = ElementFactory.classElement2("A");
classA.interfaces = <InterfaceType>[classI1.type, classI2.type];
@@ -5133,7 +5135,8 @@ class InheritanceManagerTest {
classA, [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
}
- void test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_method_getter() {
+ void
+ test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_method_getter() {
// class I1 { int m(); }
// class I2 { int get m; }
// class A implements I1, I2 {}
@@ -5156,7 +5159,8 @@ class InheritanceManagerTest {
[StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD]);
}
- void test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_numOfRequiredParams() {
+ void
+ test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_numOfRequiredParams() {
// class I1 { dynamic m(int, [int]); }
// class I2 { dynamic m(int, int, int); }
// class A implements I1, I2 {}
@@ -5205,14 +5209,15 @@ class InheritanceManagerTest {
classA, [StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE]);
}
- void test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_str_int() {
+ void
+ test_getMapOfMembersInheritedFromInterfaces_inconsistentMethodInheritance_str_int() {
// class I1 { int m(); }
// class I2 { String m(); }
// class A implements I2, I1 {}
ClassElementImpl classI1 = ElementFactory.classElement2("I1");
String methodName = "m";
- MethodElement methodM1 = ElementFactory.methodElement(
- methodName, null, [_typeProvider.stringType]);
+ MethodElement methodM1 = ElementFactory
+ .methodElement(methodName, null, [_typeProvider.stringType]);
classI1.methods = <MethodElement>[methodM1];
ClassElementImpl classI2 = ElementFactory.classElement2("I2");
MethodElement methodM2 =
@@ -5314,7 +5319,8 @@ class InheritanceManagerTest {
_assertNoErrors(classA);
}
- void test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_getters() {
+ void
+ test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_getters() {
// class I1 { int get g; }
// class I2 { num get g; }
// class A implements I1, I2 {}
@@ -5338,7 +5344,8 @@ class InheritanceManagerTest {
_assertNoErrors(classA);
}
- void test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_methods() {
+ void
+ test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_methods() {
// class I1 { dynamic m(int); }
// class I2 { dynamic m(num); }
// class A implements I1, I2 {}
@@ -5372,7 +5379,8 @@ class InheritanceManagerTest {
_assertNoErrors(classA);
}
- void test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_setters() {
+ void
+ test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_2_setters() {
// class I1 { set s(int); }
// class I2 { set s(num); }
// class A implements I1, I2 {}
@@ -5397,7 +5405,8 @@ class InheritanceManagerTest {
_assertNoErrors(classA);
}
- void test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_getters() {
+ void
+ test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_getters() {
// class A {}
// class B extends A {}
// class C extends B {}
@@ -5436,7 +5445,8 @@ class InheritanceManagerTest {
_assertNoErrors(classD);
}
- void test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_methods() {
+ void
+ test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_methods() {
// class A {}
// class B extends A {}
// class C extends B {}
@@ -5490,7 +5500,8 @@ class InheritanceManagerTest {
_assertNoErrors(classD);
}
- void test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_setters() {
+ void
+ test_getMapOfMembersInheritedFromInterfaces_union_multipleSubtypes_3_setters() {
// class A {}
// class B extends A {}
// class C extends B {}
@@ -5530,7 +5541,8 @@ class InheritanceManagerTest {
_assertNoErrors(classD);
}
- void test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_2_methods() {
+ void
+ test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_2_methods() {
// class I1 { int m(); }
// class I2 { int m([int]); }
// class A implements I1, I2 {}
@@ -5557,7 +5569,8 @@ class InheritanceManagerTest {
_assertNoErrors(classA);
}
- void test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_3_methods() {
+ void
+ test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_3_methods() {
// class I1 { int m(); }
// class I2 { int m([int]); }
// class I3 { int m([int, int]); }
@@ -5602,7 +5615,8 @@ class InheritanceManagerTest {
_assertNoErrors(classA);
}
- void test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_4_methods() {
+ void
+ test_getMapOfMembersInheritedFromInterfaces_union_oneSubtype_4_methods() {
// class I1 { int m(); }
// class I2 { int m(); }
// class I3 { int m([int]); }
@@ -9304,7 +9318,9 @@ const A = null;
expect(declarations, hasLength(2));
Element expectedElement = (declarations[0] as TopLevelVariableDeclaration)
.variables
- .variables[0].name.staticElement;
+ .variables[0]
+ .name
+ .staticElement;
EngineTestCase.assertInstanceOf((obj) => obj is PropertyInducingElement,
PropertyInducingElement, expectedElement);
expectedElement = (expectedElement as PropertyInducingElement).getter;
@@ -9495,7 +9511,9 @@ const A = null;
expect(declarations, hasLength(2));
Element expectedElement = (declarations[0] as TopLevelVariableDeclaration)
.variables
- .variables[0].name.staticElement;
+ .variables[0]
+ .name
+ .staticElement;
EngineTestCase.assertInstanceOf((obj) => obj is PropertyInducingElement,
PropertyInducingElement, expectedElement);
expectedElement = (expectedElement as PropertyInducingElement).getter;
@@ -11718,17 +11736,17 @@ class StrongModeDownwardsInferenceTest extends ResolverTestCase {
TypeAssertions _assertions;
AsserterBuilder<Element, DartType> _hasElement;
AsserterBuilder<DartType, DartType> _isType;
- AsserterBuilder2<Asserter<DartType>, Asserter<DartType>,
- DartType> _isFunction2Of;
- AsserterBuilderBuilder<Asserter<DartType>, List<Asserter<DartType>>,
- DartType> _isInstantiationOf;
+ AsserterBuilder2<Asserter<DartType>, Asserter<DartType>, DartType>
+ _isFunction2Of;
+ AsserterBuilderBuilder<Asserter<DartType>, List<Asserter<DartType>>, DartType>
+ _isInstantiationOf;
Asserter<DartType> _isInt;
Asserter<DartType> _isNum;
Asserter<DartType> _isString;
Asserter<DartType> _isDynamic;
AsserterBuilder<Asserter<DartType>, InterfaceType> _isListOf;
- AsserterBuilder2<Asserter<DartType>, Asserter<DartType>,
- InterfaceType> _isMapOf;
+ AsserterBuilder2<Asserter<DartType>, Asserter<DartType>, InterfaceType>
+ _isMapOf;
@override
void setUp() {
@@ -12172,7 +12190,7 @@ class StrongModeDownwardsInferenceTest extends ResolverTestCase {
List<int> l0 = [];
}
''');
- LibraryElement library = resolve2(source);
+ resolve2(source);
assertNoErrors(source);
verify([source]);
}
@@ -13959,7 +13977,8 @@ class B extends A {
code, typeProvider.dynamicType, typeProvider.intType);
}
- void test_finalPropertyInducingVariable_classMember_instance_propagatedTarget() {
+ void
+ test_finalPropertyInducingVariable_classMember_instance_propagatedTarget() {
addNamedSource(
"/lib.dart",
r'''
@@ -14178,7 +14197,8 @@ f(MyMap<int, String> m) {
expect(vParameter.identifier.propagatedType, same(stringType));
}
- void test_functionExpression_asInvocationArgument_functionExpressionInvocation() {
+ void
+ test_functionExpression_asInvocationArgument_functionExpressionInvocation() {
String code = r'''
main() {
(f(String value)) {} ((v) {
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | pkg/analyzer/test/generated/scanner_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698